Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android在签署apk时出现string.xml可翻译错误_Android_String_Apk_Lint - Fatal编程技术网

android在签署apk时出现string.xml可翻译错误

android在签署apk时出现string.xml可翻译错误,android,string,apk,lint,Android,String,Apk,Lint,即使在使用translateable=“false”对apk签名时获取字符串的lint错误 values/strings.xml <?xml version="1.0" encoding="UTF-8"?> <resources > <string name="app_name" translatable="false">my app name</string> <string ...</s

即使在使用translateable=“false”对apk签名时获取字符串的lint错误

values/strings.xml

 <?xml version="1.0" encoding="UTF-8"?>
    <resources >
         <string name="app_name" translatable="false">my app name</string>
         <string ...</string>
         <string ....</string>
    </resources >
有什么解决办法吗

android支持v7 appcompat strings.xml文件-

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<resources>
    <!-- Label for the "Done" button on the far left of action mode toolbars. -->
    <string name="abc_action_mode_done" translatable="false">Done</string>
    <!-- Content description for the action bar "home" affordance. [CHAR LIMIT=NONE] -->
    <string name="abc_action_bar_home_description" translatable="false">Navigate home</string>
    <!-- Content description for the action bar "up" affordance. [CHAR LIMIT=NONE] -->
    <string name="abc_action_bar_up_description" translatable="false">Navigate up</string>
    <!-- Content description for the action menu overflow button. [CHAR LIMIT=NONE] -->
    <string name="abc_action_menu_overflow_description" translatable="false">More options</string>

    <!-- SearchView accessibility description for search button [CHAR LIMIT=NONE] -->
    <string name="abc_searchview_description_search" translatable="false">Search</string>
    <!-- SearchView accessibility description for search text field [CHAR LIMIT=NONE] -->
    <string name="abc_searchview_description_query" translatable="false">Search query</string>
    <!-- SearchView accessibility description for clear button [CHAR LIMIT=NONE] -->
    <string name="abc_searchview_description_clear" translatable="false">Clear query</string>
    <!-- SearchView accessibility description for submit button [CHAR LIMIT=NONE] -->
    <string name="abc_searchview_description_submit" translatable="false">Submit query</string>
    <!-- SearchView accessibility description for voice button [CHAR LIMIT=NONE] -->
    <string name="abc_searchview_description_voice" translatable="false">Voice search</string>

    <!-- ActivityChooserView - accessibility support -->
    <!-- Description of the shwoing of a popup window with activities to choose from. [CHAR LIMIT=NONE] -->
    <string name="abc_activitychooserview_choose_application" translatable="false">Choose an app</string>
    <!-- Title for a button to expand the list of activities in ActivityChooserView [CHAR LIMIT=25] -->
    <string name="abc_activity_chooser_view_see_all" translatable="false">See all</string>
    <!-- Description of a share target (both in the list of such or the default share button) in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] -->
    <string name="abc_shareactionprovider_share_with_application" translatable="false">Share with %s</string>
    <!-- Description of the choose target button in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] -->
    <string name="abc_shareactionprovider_share_with" translatable="false">Share with</string>

</resources>

多恩
导航回家
向上导航
更多选择
搜寻
搜索查询
明确询问
提交查询
语音搜索
选择一个应用程序
见识
与%s共享
和…分享

尝试将其添加到Lint.xml

您是否为应用程序提供了多种语言(字符串)?可能有帮助you@Haresh否。为此,我在字符串标记中使用了translateable=“false”。正在为appcompt v7和google play服务获取此错误lib@PankajKumar也引用了链接。但没有解决我的问题您是否添加了此translateable=“false”lib默认字符串?
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<resources>
    <!-- Label for the "Done" button on the far left of action mode toolbars. -->
    <string name="abc_action_mode_done" translatable="false">Done</string>
    <!-- Content description for the action bar "home" affordance. [CHAR LIMIT=NONE] -->
    <string name="abc_action_bar_home_description" translatable="false">Navigate home</string>
    <!-- Content description for the action bar "up" affordance. [CHAR LIMIT=NONE] -->
    <string name="abc_action_bar_up_description" translatable="false">Navigate up</string>
    <!-- Content description for the action menu overflow button. [CHAR LIMIT=NONE] -->
    <string name="abc_action_menu_overflow_description" translatable="false">More options</string>

    <!-- SearchView accessibility description for search button [CHAR LIMIT=NONE] -->
    <string name="abc_searchview_description_search" translatable="false">Search</string>
    <!-- SearchView accessibility description for search text field [CHAR LIMIT=NONE] -->
    <string name="abc_searchview_description_query" translatable="false">Search query</string>
    <!-- SearchView accessibility description for clear button [CHAR LIMIT=NONE] -->
    <string name="abc_searchview_description_clear" translatable="false">Clear query</string>
    <!-- SearchView accessibility description for submit button [CHAR LIMIT=NONE] -->
    <string name="abc_searchview_description_submit" translatable="false">Submit query</string>
    <!-- SearchView accessibility description for voice button [CHAR LIMIT=NONE] -->
    <string name="abc_searchview_description_voice" translatable="false">Voice search</string>

    <!-- ActivityChooserView - accessibility support -->
    <!-- Description of the shwoing of a popup window with activities to choose from. [CHAR LIMIT=NONE] -->
    <string name="abc_activitychooserview_choose_application" translatable="false">Choose an app</string>
    <!-- Title for a button to expand the list of activities in ActivityChooserView [CHAR LIMIT=25] -->
    <string name="abc_activity_chooser_view_see_all" translatable="false">See all</string>
    <!-- Description of a share target (both in the list of such or the default share button) in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] -->
    <string name="abc_shareactionprovider_share_with_application" translatable="false">Share with %s</string>
    <!-- Description of the choose target button in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] -->
    <string name="abc_shareactionprovider_share_with" translatable="false">Share with</string>

</resources>