一直在阅读很多帖子,但不是他们已经帮助,请记住即时通讯新的Android,所以错误可能是显而易见的。Android清单抛出一些错误
当检查下面的代码时,它声明以下不允许在这里。
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/AppTheme"
这是XML
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mkyong.android" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="10" />
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but you must specify either coarse or fine
location permissions for the 'MyLocation' functionality.
-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name="com.android.tools.fd.runtime.BootstrapApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<!--
The API key for Google Maps-based APIs is defined as a string resource.
(See the file "res/values/google_maps_api.xml").
Note that the API key is linked to the encryption key used to sign the APK.
You need a different API key for each encryption key, including the release key
that is used to sign the APK for publishing.
You can define the keys for the debug and
release targets in src/debug/ and src/release/.
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="mykey" />
<activity
android:name="com.example.tutorialspoint7.myapplication.MapsActivity"
android:label="@string/title_activity_maps" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
这些都是错误
Error:(19) No resource identifier found for attribute 'supportsRtl' in package 'android'
Error:(22, 23) No resource found that matches the given name (at 'icon' with value '@mipmap/ic_launcher').
Error:(43, 28) No resource found that matches the given name (at 'label' with value '@string/title_activity_maps').
Error:(25, 24) No resource found that matches the given name (at 'theme' with value '@style/AppTheme').
Error:(22, 23) No resource found that matches the given name (at 'icon' with value '@mipmap/ic_launcher').
Error:(19) No resource identifier found for attribute 'supportsRtl' in package 'android'
Error:(43, 28) No resource found that matches the given name (at 'label' with value '@string/title_activity_maps').
Error:(25, 24) No resource found that matches the given name (at 'theme' with value '@style/AppTheme').
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
这个问题android:supportsRtl =“true”,你需要一个右键到左键的支持吗? –
@MarkJames for RTL您的应用应该以/最低sdk版本> 17为目标。对于mipmap,请检查您是否具有由ic_launcher命名的图像资源。对于字符串,请检查string.xml中是否有“title_activity_maps”。对于Style,请检查style.xml –