W:\work\caigoubang>cordova build --release
Running command: C:\AppCan\AppCanStudioPersonalV3.2\HDK\emulator\mas\node.exe W:\work\caigoubang\hooks\after_prepare\010_add_platform_class.js W:\work\caigouba
ng
add to body class: platform-android
Running command: W:\work\caigoubang\platforms\android\cordova\build.bat --release
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25
Running: W:\work\caigoubang\platforms\android\gradlew cdvBuildRelease -b W:\work\caigoubang\platforms\android\build.gradle -Dorg.gradle.daemon=true
:preBuild
:preReleaseBuild
:checkReleaseManifest
:CordovaLib:compileLint
:CordovaLib:copyReleaseLint UP-TO-DATE
:CordovaLib:mergeReleaseProguardFiles UP-TO-DATE
:CordovaLib:preBuild
:CordovaLib:preReleaseBuild
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseAidl UP-TO-DATE
:CordovaLib:compileReleaseRenderscript UP-TO-DATE
:CordovaLib:generateReleaseBuildConfig UP-TO-DATE
:CordovaLib:generateReleaseAssets UP-TO-DATE
:CordovaLib:mergeReleaseAssets UP-TO-DATE
:CordovaLib:generateReleaseResValues UP-TO-DATE
:CordovaLib:generateReleaseResources UP-TO-DATE
:CordovaLib:packageReleaseResources UP-TO-DATE
:CordovaLib:processReleaseManifest UP-TO-DATE
:CordovaLib:processReleaseResources UP-TO-DATE
:CordovaLib:generateReleaseSources UP-TO-DATE
:CordovaLib:compileReleaseJava UP-TO-DATE
:CordovaLib:processReleaseJavaRes UP-TO-DATE
:CordovaLib:packageReleaseJar UP-TO-DATE
:CordovaLib:compileReleaseNdk UP-TO-DATE
:CordovaLib:packageReleaseJniLibs UP-TO-DATE
:CordovaLib:packageReleaseLocalJar UP-TO-DATE
:CordovaLib:packageReleaseRenderscript UP-TO-DATE
:CordovaLib:bundleRelease UP-TO-DATE
:prepareAndroidCordovaLibUnspecifiedReleaseLibrary UP-TO-DATE
:prepareReleaseDependencies
:compileReleaseAidl UP-TO-DATE
:compileReleaseRenderscript UP-TO-DATE
:generateReleaseBuildConfig UP-TO-DATE
:generateReleaseAssets UP-TO-DATE
:mergeReleaseAssets UP-TO-DATE
:generateReleaseResValues UP-TO-DATE
:generateReleaseResources UP-TO-DATE
:mergeReleaseResources UP-TO-DATE
:processReleaseManifest UP-TO-DATE
:processReleaseResources UP-TO-DATE
:generateReleaseSources UP-TO-DATE
:compileReleaseJava UP-TO-DATE
:lintVitalRelease
W:\work\caigoubang\platforms\android\res\values\multiimagechooser_strings_en.xml:7: Error: "discard" is not translated in "de" (German), "es" (Spanish), "fr" (
French), "hu" (Hungarian), "ja" (Japanese), "ko" (Korean) [MissingTranslation]
<string name="discard">Cancel</string>
~~~~~~~~~~~~~~
W:\work\caigoubang\platforms\android\res\values\multiimagechooser_strings_en.xml:8: Error: "done" is not translated in "de" (German), "es" (Spanish), "fr" (Fre
nch), "hu" (Hungarian), "ja" (Japanese), "ko" (Korean) [MissingTranslation]
<string name="done">OK</string>
~~~~~~~~~~~
W:\work\caigoubang\platforms\android\res\values\strings.xml:3: Error: "app_name" is not translated in "de" (German), "es" (Spanish), "fr" (French), "hu" (Hunga
rian), "ja" (Japanese), "ko" (Korean) [MissingTranslation]
<string name="app_name">采购邦</string>
~~~~~~~~~~~~~~~
W:\work\caigoubang\platforms\android\res\values\strings.xml:4: Error: "launcher_name" is not translated in "de" (German), "es" (Spanish), "fr" (French), "hu" (
Hungarian), "ja" (Japanese), "ko" (Korean) [MissingTranslation]
<string name="launcher_name">@string/app_name</string>
~~~~~~~~~~~~~~~~~~~~
W:\work\caigoubang\platforms\android\res\values\strings.xml:5: Error: "activity_name" is not translated in "de" (German), "es" (Spanish), "fr" (French), "hu" (
Hungarian), "ja" (Japanese), "ko" (Korean) [MissingTranslation]
<string name="activity_name">@string/launcher_name</string>
~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "MissingTranslation":
If an application has more than one locale, then all the strings declared
in one language should also be translated in all other languages.
If the string should not be translated, you can add the attribute
translatable="false" on the <string> element, or you can define all your
non-translatable strings in a resource file called donottranslate.xml. Or,
you can ignore the issue with a tools:ignore="MissingTranslation"
attribute.
By default this detector allows regions of a language to just provide a
subset of the strings and fall back to the standard language strings. You
can require all regions to provide a full translation by setting the
environment variable ANDROID_LINT_COMPLETE_REGIONS.
You can tell lint (and other tools) which language is the default language
in your res/values/ folder by specifying tools:locale="languageCode" for
the root <resources> element in your resource file. (The tools prefix
refers to the namespace declaration http://schemas.android.com/tools.)
5 errors, 0 warnings
:
lintVitalRelease F
AILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':lintVitalRelease'.
> Lint found fatal errors while assembling a release target.
To proceed, either fix the issues identified by lint, or modify your build script as follows:
...
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
...
* 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: 7.542 secs
W:\work\caigoubang\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "W:\work\caigoubang\platforms\android\gradlew cdvBuildRelease -b W:\work\caigoubang\platforms\android\build.grad
le -Dorg.gradle.daemon=true"
ERROR building one of the platforms: Error: W:\work\caigoubang\platforms\android\cordova\build.bat: Command failed with exit code 8
You may not have the required environment or OS to build this project
Error: W:\work\caigoubang\platforms\android\cordova\build.bat: Command failed with exit code 8
at ChildProcess.whenDone (C:\Users\admin\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Process.ChildProcess._handle.onexit (child_process.js:802:5)```
1.执行cordova build 不会报错。 2.按照这个文章添加了签名https://github.com/vilic/cordova-plugin-wechat/wiki/Android-%E5%BE%AE%E4%BF%A1-SDK-%E7%AD%BE%E5%90%8D%E9%97%AE%E9%A2%98
望解答。谢谢。
报错信息如下: