gpt4 book ai didi

android - Phonegap Android构建错误

转载 作者:行者123 更新时间:2023-12-03 04:29:57 30 4
gpt4 key购买 nike

所以我正在与phonegap一起工作,我无法终生弄清楚为什么我无法运行Phonegap构建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 serve ProjectName,它在浏览器上运行。很有可能在浏览器中不使用该图标。部署.apk文件时将使用它们。因此,只需创建这些文件或通过以下方式开始一个新项目:phonegap创建NewProjectName,然后在已创建的www文件夹中编辑html文件。

关于android - Phonegap Android构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40262944/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com