我使用PhoneGap 3.3.0和Amazon WebView SDK一起尝试构建一个" Hello World"申请我的Kindle Fire 7" HDX平板电脑。
我安装了Android 4.4.2,4.2.2和2.2 SDK。我已经能够在我的Nexus 7 Android平板电脑和Android模拟器上成功构建,安装和运行多个PhoneGap应用程序。
然而," amazon-fireos"构建始终失败并出现未处理的错误'事件我搜索了Stack Overflow,网络和PhoneGap Forum,但似乎没有人遇到过这个问题,可能因为Kindle Fire支持相对较新(added 16 Dec 2013)。
$ cordova create hello com.example.hello "HelloWorld"
Creating a new cordova project with name "HelloWorld" and id "com.example.hello" at location "/Users/jack/phonegap/hello"
$ cd hello
$ cordova platform add amazon-fireos
Checking Amazon FireOS requirements...
Checking if awv_interface.jar exists... in framework/libs folder
Creating amazon-fireos project...
Preparing amazon-fireos project
$ cordova build
Generating config.xml from defaults for platform "amazon-fireos"
Preparing amazon-fireos project
Compiling app on platform "amazon-fireos" via command "/Users/jack/phonegap/hello/platforms/amazon-fireos/cordova/build"
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn EACCES
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
看起来某人有similar problem最终成为环境变量问题。 WebView SDK中只有两个jar文件(awv_android_factory.jar和 awv_interface.jar)。我尝试将jar文件的路径添加到PATH变量,将两个jar添加到CLASSPATH,但它似乎没有任何效果。
export PATH=$PATH:/Users/jack/Downloads/awv_api
export CLASSPATH=$CLASSPATH:/Users/jack/Downloads/awv_api/awv_interface.jar:/Users/jack/Downloads/awv_api/awv_android_factory.jar:.
答案 0 :(得分:1)
这是权限问题。只需执行:
chmod 777 path_to_your_sample / platforms / amazon-fireos / cordova / build
这可以解决您的问题。