cyph / cordova-plugin-chooser

Cordova file chooser plugin.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when building in Android

Arieru opened this issue · comments

commented

Android build fails when i add this to the config.xml:
<platform name="android"> <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" > <application android:largeHeap="true" /> </edit-config> </platform>

Error:

Android Studio project detected
ANDROID_HOME=C:\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_7bs5o3x8je62ncop6g97ntslv.run(C:\Users\Ariel\Documents\Projects\nativeTestApp\platforms\android\app\build.gradle:150)
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:platformAttrExtractor UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:javaPreCompileDebug UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
C:\Users\Ariel\Documents\Projects\nativeTestApp\platforms\android\app\src\main\res\xml\config.xml:67: AAPT: error: unbound prefix.
:app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:mergeDebugResources'.

Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

Same here ✋

[cordova]  :app:generateDebugResources UP-TO-DATE
[cordova]  /Users/user/Documents/Development/Cordova/myapp/platforms/android/app/src/main/res/xml/config.xml:70: AAPT: error: unbound prefix.
[cordova]      
[cordova]  /Users/user/Documents/Development/Cordova/myapp/platforms/android/app/src/main/res/xml/config.xml:70: error: unbound prefix.
[cordova]  
[cordova]  :app:mergeDebugResources
[cordova]  Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
[cordova]  :app:mergeDebugResources FAILED
[cordova]  
[cordova]  FAILURE: Build failed with an exception.
[cordova]  
[cordova]  * What went wrong:
[cordova]  Execution failed for task ':app:mergeDebugResources'.
[cordova]  > Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
[cordova]  
[cordova]  * Try:
[cordova]  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[cordova]  
[cordova]  * Get more help at https://help.gradle.org
[cordova]  
[cordova]  BUILD FAILED in 3s
[cordova]  34 actionable tasks: 4 executed, 30 up-to-date
[cordova]  /Users/user/Documents/Development/Cordova/myapp/platforms/android/gradlew: Command failed with exit code 1 Error output:
[cordova]  /Users/user/Documents/Development/Cordova/myapp/platforms/android/app/src/main/res/xml/config.xml:70: AAPT: error: unbound prefix.
[cordova]      
[cordova]  /Users/user/Documents/Development/Cordova/myapp/platforms/android/app/src/main/res/xml/config.xml:70: error: unbound prefix.
[cordova]  
[cordova]  
[cordova]  FAILURE: Build failed with an exception.
[cordova]  
[cordova]  * What went wrong:
[cordova]  Execution failed for task ':app:mergeDebugResources'.
[cordova]  > Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
[cordova]  
[cordova]  * Try:
[cordova]  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[cordova]  
[cordova]  * Get more help at https://help.gradle.org
[cordova]  
[cordova]  BUILD FAILED in 3s

Adding xmlns:android="http://schemas.android.com/apk/res/android" to the root widget tag in config.xml fixed this issue for me.

Adding xmlns:android="http://schemas.android.com/apk/res/android" to the root widget tag in config.xml fixed this issue for me.

this should be mentioned in the doc. Thanks!