Android 清单抛出了一些错误
Android Manifest throwing up some errors
阅读了很多帖子,但没有一个有帮助,请记住我是 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" 那么你的 targetSdk 必须是 17
因为您正在使用 android:supportsRtl="true"
那么您的 targetSdk 必须大于 17
阅读了很多帖子,但没有一个有帮助,请记住我是 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" 那么你的 targetSdk 必须是 17
因为您正在使用 android:supportsRtl="true"
那么您的 targetSdk 必须大于 17