Error:(4) Error: "ssdk_instapager_login_html" is not translated in "en" (English) [MissingTranslation]
很明显错误是资源文件Values文件夹下的strings文件没能翻译成英文,而我们也不需要这种翻译我们该怎么办呢?
修改资源文件添加
translatable="false"属性当然可以,但是这样加起来很多不好弄,
- <string name="app_name" translatable="false">你好</string>
为了一键解决这个问题,我们可以在要打包的module的buil.gradle文件中加标签。就能快速帮你解决。
- lintOptions{
- checkReleaseBuilds false
- abortOnError false
- }
checkReleaseBuilds就是在打包Release版本的时候进行检测,这里就直接关掉了,也可以打开,这样报错还会显示出来。关键的就是abortOnError一定要设为false,这样即使有报错也不会停止打包了。
把该标签加到,对应的android标签中如下:
- apply plugin: 'com.android.application'
- android {
- compileSdkVersion 25
- buildToolsVersion "25.0.2"
- defaultConfig {
- applicationId "cn.banwxf.shoppingmall"
- minSdkVersion 19
- targetSdkVersion 25
- versionCode 1
- versionName "1.0"
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- ndk {
- abiFilters "armeabi-v7a", "x86"
- }
- }
- lintOptions{
- checkReleaseBuilds false
- abortOnError false
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
- sourceSets {
- main {
- jniLibs.srcDirs = ['libs']
- }
- }
- }
- dependencies {
- compile fileTree(include: ['*.jar'], dir: 'libs')
- androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
- exclude group: 'com.android.support', module: 'support-annotations'
- })
- compile project(':IMKit')
- compile 'com.jakewharton:butterknife:5.1.1'
- compile 'com.android.support:support-v4:25.1.1'
- compile 'com.squareup.retrofit2:retrofit:2.0.2'
- compile 'com.squareup.retrofit2:converter-gson:2.0.2'
- compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
- compile 'com.android.support:appcompat-v7:25.1.1'
- compile files('libs/fuqianla/fuqianla_support.jar')
- compile files('libs/fuqianla/fuqianla2_6_0.jar')
- compile files('libs/alipay/alipaySDK.jar')
- compile files('libs/wxpay/libammsdk.jar')
- compile files('libs/unionpay/UPPayPluginExPro.jar')
- compile files('libs/unionpay/UPPayAssistEx.jar')
- compile files('libs/MiPush_SDK_Client_3_2_2.jar')
- }
值得注意的是标签位置,1、要打包的module下的build.gradle文件,2、android标签是父标签