Error: “app_name” is not translated in af

后端 未结 11 540
灰色年华
灰色年华 2021-01-30 16:21

I am new at Android coding and this forum. When I am trying to run the project to test it I am getting the following error:-

\"app_name\" is not translate

相关标签:
11条回答
  • 2021-01-30 16:53

    Try adding translatable="[true/false]".

    <string name="app_name" translatable="false">ThessMuseams</string>

    0 讨论(0)
  • 2021-01-30 16:54

    I use android studio(v1.2), add the following build script then solved the issue:

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }
    
    0 讨论(0)
  • 2021-01-30 16:55

    How to disable Translations error messages

    If you want to suppress the error message then go to,

    On Mac OS X,

    Eclipse -> Preferences -> Android -> Lint Error Checking

    Solving Eclipse Android Lint Translation error messages

    On Windows,

    Window -> Preferences -> Android -> Lint Error Checking

    0 讨论(0)
  • 2021-01-30 16:56

    For Android Studio you can use either of the below ways to solve this issue

    Method 1. Disable MissingTranslation check in build.gradle with

    android {
         lintOptions {
            disable 'MissingTranslation'
        }
    }
    

    Method 2. Ignore the MissingTranslation in you resource strings file with

    <?xml version="1.0" encoding="utf-8"?>
    <resources
      xmlns:tools="http://schemas.android.com/tools"
      tools:ignore="MissingTranslation" >
    
      <!-- your strings here; no need now for the translatable attribute -->
    
    </resources>
    

    Method 3. Set translatable to false on specific string with

    <string name="hello" translatable="false">hello</string>
    

    You also can refer to Avoid Android Lint complains about not-translated string

    0 讨论(0)
  • 2021-01-30 16:59

    With Android Studio, you can prevent lint from checking the MissingTranslation warning. Add the following to your app/build.gradle:

    To ignore this in a gradle build add this to the android section of your build file:

    android {
        ...
        lintOptions {
           disable 'MissingTranslation'
        }
        ...
    }
    
    0 讨论(0)
提交回复
热议问题