java.io.FileNotFoundException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I´m trying to make jenkins use all my enviromnent (including .android/avd and sdk). So I tryed adding variables to my node: !Screen Shot 2015-07-07 at 10.59.42 AM.png|thumbnail! Use https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin and this variables under `Prepare an environment for the run` for my task: ``` ANDROID_AVD_HOME=/Users/danielgomez22/.android/avd/ ANDROID_HOME=/Users/danielgomez22/Library/Android/sdk ANDROID_SDK_HOME=/Users/danielgomez22/ JENKINS_ANDROID_HOME=/Users/danielgomez22/Library/Android/sdk PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH ``` But jenkins always try to get avd emulators from /Users/Shared/Jenkins/.android/avd/. And then when I try to run a created emulator it returns: ``` FATAL: /Users/Shared/Jenkins/.android/avd/Nexus_5_API_22_Google_Apis.ini (No such file or directory) java.io.FileNotFoundException: /Users/Shared/Jenkins/.android/avd/Nexus_5_API_22_Google_Apis.ini (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileReader.<init>(FileReader.java:72) at hudson.plugins.android_emulator.util.Utils.parseConfigFile(Utils.java:449) at hudson.plugins.android_emulator.SdkInstaller$3.call(SdkInstaller.java:414) at hudson.plugins.android_emulator.SdkInstaller$3.call(SdkInstaller.java:411) at hudson.remoting.LocalChannel.call(LocalChannel.java:45) at hudson.plugins.android_emulator.SdkInstaller.getPlatformFromExistingEmulator(SdkInstaller.java:411) at hudson.plugins.android_emulator.SdkInstaller.getPlatformForEmulator(SdkInstaller.java:395) at hudson.plugins.android_emulator.SdkInstaller.installDependencies(SdkInstaller.java:236) at hudson.plugins.android_emulator.AndroidEmulator.setUp(AndroidEmulator.java:256) at hudson.model.Build$BuildExecution.doRun(Build.java:156) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:381) Finished: FAILURE ``` And when I try to create a new one: ``` $ /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android list target [android] Using Android SDK: /Users/Shared/Jenkins/Home/tools/android-sdk [android] Waiting 20 seconds before starting emulator... $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb start-server * daemon not running. starting it now on port 6659 * * daemon started successfully * $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb start-server [android] Starting Android emulator [android] Erasing existing emulator data... $ /Users/Shared/Jenkins/Home/tools/android-sdk/tools/emulator -ports 6657,6658 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_320_1080x1920_Google_Inc._Google_APIs_22_google_apis-x86 -no-snapshot-load -no-snapshot-save -wipe-data -no-window -no-audio -gpu off -no-boot-anim PANIC: ANDROID_AVD_HOME is defined but could not find hudson_en-US_320_1080x1920_Google_Inc._Google_APIs_22_google_apis-x86.ini file in $ANDROID_AVD_HOME (Note: avd is searched in the order of $ANDROID_AVD_HOME,$ANDROID_SDK_HOME/.android/avd and $HOME/.android/avd) [android] Emulator did not appear to start; giving up $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect localhost:6658 [android] Stopping Android emulator $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb kill-server Finished: NOT_BUILT ```
    via by Daniel Gomez,
  • Error reading file
    via Stack Overflow by alekro100
    ,
  • GitHub comment 150#218795138
    via GitHub by koral--
    ,
    • java.io.FileNotFoundException: src/main/java/sharkbread/test/data/ingredient_data.csv (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileReader.<init>(FileReader.java:72) at sharkbread.test.classes.IngredientTest.populateTestData(IngredientTest.java:42) at sharkbread.test.classes.IngredientTest.main(IngredientTest.java:84) at sharkbread.test.classes.AllTest.createaAllData(AllTest.java:36) at sharkbread.test.classes.ui.CreateaAllDataRunner.run(CreateaAllDataRunner.java:26) at java.lang.Thread.run(Thread.java:745)

    Users with the same issue

    rp
    1 times, last one,
    jf-ast
    1 times, last one,
    tomthomas
    1 times, last one,
    serious2monkeys
    9 times, last one,
    Unknown visitor1 times, last one,
    124 more bugmates