モバイル Web サイトのSelendroidテストを実行しようとしていますが、テストを実行すると、次のような例外が発生します。
May 19, 2014 11:48:59 AM io.selendroid.SelendroidLauncher launchServer
INFO: Starting selendroid-server port 4444
May 19, 2014 11:48:59 AM io.selendroid.SelendroidLauncher launchServer
SEVERE: Error occurred while building server: io.selendroid.exceptions.SelendroidException: Environment variable 'ANDROID_HOME' was not found!
java.lang.RuntimeException: io.selendroid.exceptions.SelendroidException: Environment variable 'ANDROID_HOME' was not found!
at io.selendroid.server.model.SelendroidStandaloneDriver.initApplicationsUnderTest(SelendroidStandaloneDriver.java:142)
at io.selendroid.server.model.SelendroidStandaloneDriver.<init>(SelendroidStandaloneDriver.java:80)
at io.selendroid.server.SelendroidStandaloneServer.initializeSelendroidServer(SelendroidStandaloneServer.java:91)
at io.selendroid.server.SelendroidStandaloneServer.<init>(SelendroidStandaloneServer.java:65)
at io.selendroid.SelendroidLauncher.launchServer(SelendroidLauncher.java:49)
at io.selendroid.SelendroidLauncher.launchSelendroid(SelendroidLauncher.java:73)
at com.pb.crawler.MobileWebTest.startSelendroidServer(MobileWebTest.java:86)
at com.pb.crawler.MobileWebTest.main(MobileWebTest.java:27)
Caused by: io.selendroid.exceptions.SelendroidException: Environment variable 'ANDROID_HOME' was not found!
at io.selendroid.android.AndroidSdk.androidHome(AndroidSdk.java:97)
at io.selendroid.android.AndroidSdk.platformToolsHome(AndroidSdk.java:86)
at io.selendroid.android.AndroidSdk.aapt(AndroidSdk.java:39)
at io.selendroid.android.impl.DefaultAndroidApp.deleteFileFromWithinApk(DefaultAndroidApp.java:102)
at io.selendroid.builder.SelendroidServerBuilder.deleteFileFromAppSilently(SelendroidServerBuilder.java:116)
at io.selendroid.builder.SelendroidServerBuilder.resignApp(SelendroidServerBuilder.java:125)
at io.selendroid.server.model.SelendroidStandaloneDriver.initApplicationsUnderTest(SelendroidStandaloneDriver.java:138)
... 7 more
Exception in thread "main" java.lang.RuntimeException: io.selendroid.exceptions.SelendroidException: Environment variable 'ANDROID_HOME' was not found!
at io.selendroid.server.model.SelendroidStandaloneDriver.initApplicationsUnderTest(SelendroidStandaloneDriver.java:142)
at io.selendroid.server.model.SelendroidStandaloneDriver.<init>(SelendroidStandaloneDriver.java:80)
at io.selendroid.server.SelendroidStandaloneServer.initializeSelendroidServer(SelendroidStandaloneServer.java:91)
at io.selendroid.server.SelendroidStandaloneServer.<init>(SelendroidStandaloneServer.java:65)
at io.selendroid.SelendroidLauncher.launchServer(SelendroidLauncher.java:49)
at io.selendroid.SelendroidLauncher.launchSelendroid(SelendroidLauncher.java:73)
at com.pb.crawler.MobileWebTest.startSelendroidServer(MobileWebTest.java:86)
at com.pb.crawler.MobileWebTest.main(MobileWebTest.java:27)
Caused by: io.selendroid.exceptions.SelendroidException: Environment variable 'ANDROID_HOME' was not found!
at io.selendroid.android.AndroidSdk.androidHome(AndroidSdk.java:97)
at io.selendroid.android.AndroidSdk.platformToolsHome(AndroidSdk.java:86)
at io.selendroid.android.AndroidSdk.aapt(AndroidSdk.java:39)
at io.selendroid.android.impl.DefaultAndroidApp.deleteFileFromWithinApk(DefaultAndroidApp.java:102)
at io.selendroid.builder.SelendroidServerBuilder.deleteFileFromAppSilently(SelendroidServerBuilder.java:116)
at io.selendroid.builder.SelendroidServerBuilder.resignApp(SelendroidServerBuilder.java:125)
at io.selendroid.server.model.SelendroidStandaloneDriver.initApplicationsUnderTest(SelendroidStandaloneDriver.java:138)
... 7 more
私ANDROID_HOME
はすでにコマンドをエコーするように設定されていますが、正しいパスが得られます。
~ vshukla$ echo $JAVA_HOME
/Library/Java/Home
~ vshukla$ echo $ANDROID_HOME
/Users/vshukla/AndroidSDK/sdk
なぜこれが起こっているのか理解できません。助けてください。