Phonegap android 构建错误

Phonegap android build error

所以我正在使用 phonegap,但我终其一生都无法弄清楚为什么我不能 运行 Phonegap build android。

我试过,通过 android studio 添加 Android 版本,我尝试在 android studio 中刷新和构建。

我不确定您需要查看哪些文件,请告诉我,我会提供。

任何时候我都会收到这个错误:

* 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

编辑:整个过程:

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

当您 运行 使用:phonegap 服务 ProjectName 时,它​​ 运行 在浏览器上。它很可能不在浏览器中使用该图标。它们将在部署 .apk 文件时使用。因此,只需创建这些文件或通过以下方式启动一个新项目:phonegap create NewProjectName,然后编辑您创建的 www 文件夹中的 html 文件。