每次我想清理,重建项目或构建APK时都会出现这个错误
Gradle tasks [:android:generateDebugSources,:android:generateDebugTestSources] C:\用户\阿卜杜勒\桌面\ martianrun主\机器人\编译\ \中间体舱单\全\调试\ AndroidManifest.xml中 错误:(25,28)找不到与给定名称匹配的资源(在'value'处,值为'@ string / app_id')。 错误:(28,28)找不到与给定名称匹配的资源(在'value'处,值为'@ string / app_id')。 错误:任务':android:processDebugResources'执行失败。
com.android.ide.common.internal.LoggedErrorException:无法运行命令: C:\ Users \ Abdel \ AppData \ Local \ Android \ Sdk \ build-tools \ 21.1.2 \ aapt.exe package -f --no-crunch -IC:\ Users \ Abdel \ AppData \ Local \ Android \ Sdk \平台\ android-21 \ android.jar -MC:\ Users \ Abdel \ Desktop \ martianrun-master \ android \ build \ intermediates \ manifests \ full \ debug \ AndroidManifest.xml -SC:\ Users \ Abdel \ Desktop \ martianrun- master \ android \ build \ intermediates \ res \ debug -AC:\ Users \ Abdel \ Desktop \ martianrun-master \ android \ build \ intermediates \ assets \ debug -m -JC:\ Users \ Abdel \ Desktop \ martianrun-master \ android \ build \ generated \ source \ r \ _ debug -FC:\ Users \ Abdel \ Desktop \ martianrun-master \ android \ build \ intermediates \ res \ resources-debug.ap_ --debug-mode --custom-package com。 doragames.adventure.android -0 apk --output-text-symbols C:\ Users \ Abdel \ Desktop \ martianrun-master \ android \ build \ intermediates \ symbols \ debug 错误代码: 1 输出: C:\ Users \ Abdel \ Desktop \ martianrun-master \ android \ build \ intermediates \ manifests \ full \ debug \ AndroidManifest.xml:23:error:错误:找不到与给定名称匹配的资源(在'value'处有值) '@字符串/ APP_ID')。 C:\ Users \ Abdel \ Desktop \ martianrun-master \ android \ build \ intermediates \ manifests \ full \ debug \ AndroidManifest.xml:26:error:错误:找不到与给定名称匹配的资源(在'value'处有值) '@字符串/ APP_ID')。 信息:建筑失败 信息:总时间:10.424秒 信息:3个错误 信息:0警告 信息:请参阅控制台中的完整输出
我的AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gamesTex.adventure.MainApplication"
android:installLocation="auto"
android:versionCode="21"
android:versionName="21.1.2" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature android:glEsVersion="0x00020000" />
<application
android:name="com.gamesTex.adventure.MainApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/GdxTheme" >
<meta-data
android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />
<meta-data
android:name="com.google.android.gms.appstate.APP_ID"
android:value="@string/app_id" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.google.android.gms.analytics.globalConfigResource"
android:resource="@xml/app_tracker_config" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<activity
android:name="com.gamesTex.adventure.android.AndroidLauncher"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
我的styles.xml
<style name="GdxTheme" parent="android:Theme">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources>
my strings.xml
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2014. William Mora
~
~ 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>
<string name="app_name">Martian Run!</string>
<!-- GameHelper strings -->
<string name="gamehelper_sign_in_failed">Failed to sign in. Please check your network connection and try again.</string>
<string name="gamehelper_app_misconfigured">The application is incorrectly configured. Check that the package name and signing certificate match the client ID created in Developer Console. Also, if the application is not yet published, check that the account you are trying to sign in with is listed as a tester account. See logs for more information.</string>
<string name="gamehelper_license_failed">License check failed.</string>
<string name="gamehelper_unknown_error">Unknown error.</string>
<string name="auth_client_needs_enabling_title"></string>
<string name="auth_client_needs_installation_title"></string>
<string name="auth_client_needs_update_title"></string>
<string name="auth_client_play_services_err_notification_msg"></string>
<string name="auth_client_requested_by_msg"></string>
<string name="auth_client_using_bad_version_title"></string>
</resources>