I\'m trying to publish my Android app by following the instructions here:
http://ionicframework.com/docs/guide/publishing.html
However, when I run cordova bu
Add the following entry to the /platforms/android/build.gradle
file in your Ionic project:
android {
lintOptions { disable 'MissingTranslation', 'ExtraTranslation' }
}
worked.
For those who prefer to keep platforms
directory out of the VCS (Git, etc),
the best solution at the moment is to use a plugin called ignore-lint-translation.
cordova plugin add cordova-plugin-ignore-lint-translation --save
The effective result is the addition of a gradle file that will disable such lint options (doh!).
If your build failed because of MissingTranslation
issues, and if the string should not be translated, you can add the attribute translatable="false"
on that <string>
element in /platforms/android/app/src/main/res/values/strings.xml
file.
So, if the strings in the strings.xml
file is like this:
<string name="app_name">Your App Name</string>
<string name="launcher_name">@string/app_name</string>
<string name="activity_name">@string/launcher_name</string>
Edit them to look like this:
<string name="app_name" translatable="false">Your App Name</string>
<string name="launcher_name" translatable="false">@string/app_name</string>
<string name="activity_name" translatable="false">@string/launcher_name</string>
This solution worked for me.
Solved this by adding
lintOptions {
abortOnError false
}
to the android {}
section in /platforms/android/build.gradle
echo "android { lintOptions { checkReleaseBuilds false } }" >> platforms/android/build-extras.gradle
To fixed this error you should add
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
}
In android {} section in /platforms/android/build.gradle