刚开始学习phonegap 设置phonegap并按照说明添加UPNP plugin后,会显示此错误。
~/phone/testing2$ phonegap run android
[phonegap] executing 'cordova run android ' ...
ANDROID_HOME=/home/arjun/Android/Sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
Subproject Path: CordovaLib
Incremental java compilation is an incubating feature.
Download https://repo1.maven.org/maven2/com/loopj/android/android-async-http/1.4.9/android-async-http-1.4.9.pom
Download https://repo1.maven.org/maven2/cz/msebera/android/httpclient/4.3.6/httpclient-4.3.6.pom
Download https://repo1.maven.org/maven2/cz/msebera/android/httpclient/4.3.6/httpclient-4.3.6.jar
Download https://repo1.maven.org/maven2/com/loopj/android/android-async-http/1.4.9/android-async-http-1.4.9.jar
:preBuild
UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl
:CordovaLib:compileDebugNdk
UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint
UP-TO-DATE
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:CordovaLib:mergeDebugProguardFiles
:CordovaLib:packageDebugRenderscript
UP-TO-DATE
:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:processDebugManifest
:CordovaLib:generateDebugBuildConfig
:CordovaLib:processDebugResources
/home/arjun/Android/Sdk/build-tools/25.0.1/aapt: 3: /home/arjun/Android/Sdk/build-tools/25.0.1/aapt: Syntax error: Unterminated quoted string
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':CordovaLib:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with
--stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 16.123 secs
Error: /home/arjun/phone/testing2/platforms/android/gradlew: Command failed with exit code 1 Error output:
/home/arjun/Android/Sdk/build-tools/25.0.1/aapt: 3: /home/arjun/Android/Sdk/build-tools/25.0.1/aapt: Syntax error: Unterminated quoted string
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':CordovaLib:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
我只是下载了Android工作室,运行安装程序,添加了Android Kitkat,添加了env变量,然后才运行了phonegap命令。
如何处理此错误?
另外,如何判断phonegap是否可以为Android 4.4构建/编译?因为,android studio现在有两个平台,Nougat和Kitkat。