Mat Morse Mat Morse - 1 month ago 13
Android Question

Phonegap android build error

So i'm working with phonegap and I cant for the life of me figure out why I can't run Phonegap build android.

I've tried, adding the Android version though android studio, I've tried refreshing and building in android studio.

I'm not sure what files you need to see so just let me know and I'll provide them.

Anytime I do I get this error:

* What went wrong:

Execution failed for task ':processDebugResources'.

>
com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException: Process 'command
'/Users/mathewmorse/Library/Android/sdk/build-tools/23.0.2/aapt''
finished with non-zero exit value 1




BUILD FAILED



Total time: 13.317 secs

Error: Error code 1 for command:
/Users/mathewmorse/Documents/www/susu/platforms/android/gradlew with
args: cdvBuildDebug,
b,/Users/mathewmorse/Documents/www/susu/platforms/android/build.gradle,-
Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true


EDIT: The Whole Process:

Mathews-MacBook-Pro:susu mathewmorse$ phonegap build android
[phonegap] executing 'cordova build android ' ...
cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/icon/android/drawable-ldpi-icon.png


cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/icon/android/drawable-mdpi-icon.png

cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/icon/android/drawable-hdpi-icon.png


cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/icon/android/drawable-xhdpi-icon.png

cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/icon/android/drawable-xxhdpi-icon.png


cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/icon/android/drawable-xxxhdpi-icon.png


cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/screen/android/drawable-land-ldpi-screen.png


cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/screen/android/drawable-land-mdpi-screen.png


cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/screen/android/drawable-land-hdpi-screen.png


cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/screen/android/drawable-land-xhdpi-screen.png


cp: no such file or directory: /Users/mathewmorse/Documents/www/susu/www/www/res/screen/android/drawable-land-xxhdpi-screen.png


cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/screen/android/drawable-land-xxxhdpi-screen.png


cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/screen/android/drawable-port-ldpi-screen.png


cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/screen/android/drawable-port-mdpi-screen.png


cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/screen/android/drawable-port-hdpi-screen.png


cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/screen/android/drawable-port-xhdpi-screen.png


cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/screen/android/drawable-port-xxhdpi-screen.png


cp: no such file or directory:
/Users/mathewmorse/Documents/www/susu/www/www/res/screen/android/drawable-port-xxxhdpi-screen.png


ANDROID_HOME=/Users/mathewmorse/Library/Android/sdk

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home

:preBuild
UP-TO-DATE

:preDebugBuild

UP-TO-DATE

:checkDebugManifest


:CordovaLib:preBuild

UP-TO-DATE

:CordovaLib:preDebugBuild

UP-TO-DATE

:CordovaLib:compileDebugNdk

UP-TO-DATE

:CordovaLib:compileLint


:CordovaLib:copyDebugLint

UP-TO-DATE

:CordovaLib:mergeDebugProguardFiles
UP-TO-DATE

:CordovaLib:packageDebugRenderscript

UP-TO-DATE

:CordovaLib:checkDebugManifest


:CordovaLib:prepareDebugDependencies


:CordovaLib:compileDebugRenderscript

UP-TO-DATE

:CordovaLib:generateDebugResValues

UP-TO-DATE

:CordovaLib:generateDebugResources UP-TO-DATE

:CordovaLib:packageDebugResources

UP-TO-DATE

:CordovaLib:compileDebugAidl
UP-TO-DATE


:CordovaLib:generateDebugBuildConfig

UP-TO-DATE

:CordovaLib:generateDebugAssets

UP-TO-DATE

:CordovaLib:mergeDebugAssets

UP-TO-DATE

:CordovaLib:processDebugManifest

UP-TO-DATE

:CordovaLib:processDebugResources

UP-TO-DATE

:CordovaLib:generateDebugSources

UP-TO-DATE

:CordovaLib:compileDebugJavaWithJavac

UP-TO-DATE

:CordovaLib:processDebugJavaRes

UP-TO-DATE

:CordovaLib:transformResourcesWithMergeJavaResForDebug

UP-TO-DATE

:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug

UP-TO-DATE

:CordovaLib:mergeDebugJniLibFolders

UP-TO-DATE

:CordovaLib:transformNative_libsWithMergeJniLibsForDebug

UP-TO-DATE

:CordovaLib:transformNative_libsWithSyncJniLibsForDebug

UP-TO-DATE

:CordovaLib:bundleDebug

UP-TO-DATE

:prepareAndroidCordovaLibUnspecifiedDebugLibrary

UP-TO-DATE

:preReleaseBuild

UP-TO-DATE

:CordovaLib:preReleaseBuild

UP-TO-DATE


:CordovaLib:compileReleaseNdk

UP-TO-DATE

:CordovaLib:copyReleaseLint
UP-TO-DATE

:CordovaLib:mergeReleaseProguardFiles

UP-TO-DATE

:CordovaLib:packageReleaseRenderscript
UP-TO-DATE


:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies

:CordovaLib:compileReleaseRenderscript

UP-TO-DATE
:CordovaLib:generateReleaseResValues
UP-TO-DATE
:CordovaLib:generateReleaseResources UP-TO-DATE
:CordovaLib:packageReleaseResources

UP-TO-DATE
:CordovaLib:compileReleaseAidl

UP-TO-DATE
:CordovaLib:generateReleaseBuildConfig

UP-TO-DATE

:CordovaLib:generateReleaseAssets
UP-TO-DATE

:CordovaLib:mergeReleaseAssets

UP-TO-DATE

:CordovaLib:processReleaseManifest

UP-TO-DATE

:CordovaLib:processReleaseResources

UP-TO-DATE

:CordovaLib:generateReleaseSources

UP-TO-DATE


:CordovaLib:compileReleaseJavaWithJavac

UP-TO-DATE

:CordovaLib:processReleaseJavaRes

UP-TO-DATE

:CordovaLib:transformResourcesWithMergeJavaResForRelease

UP-TO-DATE

:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease

UP-TO-DATE

:CordovaLib:mergeReleaseJniLibFolders
UP-TO-DATE


:CordovaLib:transformNative_libsWithMergeJniLibsForRelease

UP-TO-DATE

:CordovaLib:transformNative_libsWithSyncJniLibsForRelease

UP-TO-DATE

:CordovaLib:bundleRelease

UP-TO-DATE

:prepareComAndroidSupportSupportV42311Library

UP-TO-DATE

:prepareDebugDependencies


:compileDebugAidl

UP-TO-DATE

:compileDebugRenderscript

UP-TO-DATE

:generateDebugBuildConfig
UP-TO-DATE

:generateDebugAssets

UP-TO-DATE

:mergeDebugAssets

UP-TO-DATE

:generateDebugResValues
UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources
/Users/mathewmorse/Documents/www/susu/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:24:23-37 : AAPT: No resource found that matches the given name (at 'icon' with value '@drawable/icon').



FAILED



FAILURE:
Build failed with an exception.



* What went wrong:

Execution failed for task ':processDebugResources'.

>
com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException: Process 'command
'/Users/mathewmorse/Library/Android/sdk/build-tools/23.0.2/aapt''
finished with non-zero exit value 1



* 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: 13.317 secs

Error: Error code 1 for command:
/Users/mathewmorse/Documents/www/susu/platforms/android/gradlew with
args: cdvBuildDebug,-
b,/Users/mathewmorse/Documents/www/susu/platforms/android/build.gradle,-
Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true

Answer

When you run with: phonegap serve ProjectName,it runs on browser. It is strongly possible that it does not uses that icons in browser. They will be used when deploying the .apk file. So just create these files or start a new project by : phonegap create NewProjectName, then edit the html files in www folder that you have made.