cordova build android报错,运行cordova build -release android时出错

我想按照以下说明发布我的Android应用:

但是,当我运行cordova build –release android我得到以下错误:

:lintVitalArmv7Release

/Users/xxx/Documents/xxx/xxx/platforms/android/res/values/arrays.xml:3: Error: "country_codes" is not translated in "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "es" (Spanish), "eu" (Basque), "fi" (Finnish), "fr" (French), "he" (Hebrew), "hi" (Hindi), "hu" (Hungarian), "id" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ko" (Korean), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "ru" (Russian), "sk" (Slovak), "sl" (Slovene), "sv" (Swedish), "tr" (Turkish), "zh-rCN" (Chinese: China), "zh-rTW" (Chinese: Taiwan, Province of China) [MissingTranslation]

~~~~~~~~~~~~~~~~~~~~

/Users/xxx/Documents/xxx/xxx/platforms/android/res/values/strings.xml:3: Error: "app_name" is not translated in "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "es" (Spanish), "eu" (Basque), "fi" (Finnish), "fr" (French), "he" (Hebrew), "hi" (Hindi), "hu" (Hungarian), "id" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ko" (Korean), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "ru" (Russian), "sk" (Slovak), "sl" (Slovene), "sv" (Swedish), "tr" (Turkish), "zh-rCN" (Chinese: China), "zh-rTW" (Chinese: Taiwan, Province of China) [MissingTranslation]

myapp

~~~~~~~~~~~~~~~

/Users/xxx/Documents/xxx/xxx/platforms/android/res/values/strings.xml:4: Error: "launcher_name" is not translated in "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "es" (Spanish), "eu" (Basque), "fi" (Finnish), "fr" (French), "he" (Hebrew), "hi" (Hindi), "hu" (Hungarian), "id" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ko" (Korean), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "ru" (Russian), "sk" (Slovak), "sl" (Slovene), "sv" (Swedish), "tr" (Turkish), "zh-rCN" (Chinese: China), "zh-rTW" (Chinese: Taiwan, Province of China) [MissingTranslation]

@string/app_name

~~~~~~~~~~~~~~~~~~~~

/Users/xxx/Documents/xxx/xxx/platforms/android/res/values/strings.xml:5: Error: "activity_name" is not translated in "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "es" (Spanish), "eu" (Basque), "fi" (Finnish), "fr" (French), "he" (Hebrew), "hi" (Hindi), "hu" (Hungarian), "id" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ko" (Korean), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "ru" (Russian), "sk" (Slovak), "sl" (Slovene), "sv" (Swedish), "tr" (Turkish), "zh-rCN" (Chinese: China), "zh-rTW" (Chinese: Taiwan, Province of China) [MissingTranslation]

@string/launcher_name

~~~~~~~~~~~~~~~~~~~~

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 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 element in your resource file. (The tools prefix

refers to the namespace declaration http://schemas.android.com/tools.)

/Users/xxx/Documents/xxx/xxx/platforms/android/res/values-ar/strings.xml:64: Error: "menu_settings" is translated here but not found in default locale [ExtraTranslation]

???????

5 errors, 0 warnings

:lintVitalArmv7Release FAILED

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':lintVitalArmv7Release'.

> 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: 4.583 secs

/Users/xxx/Documents/xxx/xxx/platforms/android/cordova/node_modules/q/q.js:126

throw e;

^

Error code 1 for command: /Users/xxx/Documents/xxx/xxx/platforms/android/gradlew with args: cdvBuildRelease,-b,/Users/xxx/Documents/xxx/xxx/platforms/android/build.gradle,-Dorg.gradle.daemon=true

ERROR building one of the platforms: Error: /Users/xxx/Documents/xxx/xxx/platforms/android/cordova/build: Command failed with exit code 8

You may not have the required environment or OS to build this project

Error: /Users/xxx/Documents/xxx/xxx/platforms/android/cordova/build: Command failed with exit code 8

at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)

at ChildProcess.emit (events.js:98:17)

at maybeClose (child_process.js:766:16)

at Process.ChildProcess._handle.onexit (child_process.js:833:5)

我可以运行离子生成android和部署到模拟器没有问题。

我试过搜索lintOptions和build.gradle,但我不能在我的项目中的任何地方找到它们…

任何人可以帮助?提前致谢

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值