简体   繁体   English

config.xml格式错误的Phonegap

[英]config.xml malformed Phonegap

If it's truly a repeat question, I'll happily remove. 如果确实是重复问题,我会很乐意删除。

Application won't build. 应用程序无法生成。 My Config.xml is as basic as it comes so I don't understand why I get the failed builds. 我的Config.xml是最基本的,所以我不明白为什么我会得到失败的版本。

<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns   = "http://www.w3.org/ns/widgets"
xmlns:gap   = "http://phonegap.com/ns/1.0"
id          = "com.phonegap.rcw"
version     = "0.0.1" 
versionCode = "1">

<preference name="phonegap-version" value="cli-6.3.0" />
<preference name="Orientation" value="portrait" />

<name>Codes</name>
<description>Codes for the State</description>


  <platform name="android">
    <icon src="images/Icon.jpg" gap:platform="android" gap:qualifier="ldpi" />
    <icon src="images/Icon.jpg" gap:platform="android" gap:qualifier="mdpi" />
    <icon src="images/Icon.jpg" gap:platform="android" gap:qualifier="hdpi" />
    <icon src="images/Icon.jpg" gap:platform="android" gap:qualifier="xhdpi" />
    <icon src="images/Icon.jpg" gap:platform="android" gap:qualifier="xxhdpi" />
    <icon src="images/Icon.jpg" gap:platform="android" gap:qualifier="fr-xxhdpi" /> 
</platform>

<author email="XXXXXX.XXaff@gmail.com">
 Noah XXXXXXXX
</author>

</widget>

And the error I get is: 我得到的错误是:

Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
: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
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:compileDebugAidl
:CordovaLib:generateDebugBuildConfig
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:CordovaLib:processDebugManifest
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:incrementalDebugJavaCompilationSafeguard
:CordovaLib:compileDebugJavaWithJavac
:CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug
:CordovaLib:bundleDebug
:prepareProjectCordovaLibUnspecifiedDebugLibrary
:prepareDebugDependencies
:compileDebugAidl
:compileDebugRenderscript
:generateDebugBuildConfig
:mergeDebugShaders
:compileDebugShaders
:generateDebugAssets
:mergeDebugAssets
:generateDebugResValues
:generateDebugResources
:mergeDebugResources
:processDebugManifest
:processDebugResources 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 '/android-sdk/build-tools/24.0.1/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: 1.64 secs
Error: /project/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

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 '/android-sdk/build-tools/24.0.1/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.
at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:818:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

I even tried rolling back to <preference name="phonegap-version" value="cli-5.2.1" /> as suggested on the Phonegap forums and still have no luck. 我什至尝试按照Phonegap论坛上的建议回滚到<preference name="phonegap-version" value="cli-5.2.1" /> ,但仍然没有运气。

Probably a quick fix. 可能是快速修复。 Any help?? 有帮助吗?

Try: 尝试:

$ find your/project/bower-lib/ -type f -name "*.gz" -exec rm -f {} \;

Delete all .gz packages, cordova does not support this files. 删除所有.gz软件包,cordova不支持此文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM