2017-02-23 75 views
0

一直在閱讀很多帖子,但不是他們已經幫助,請記住即時通訊新的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 
+0

這個問題android:supportsRtl =「true」,你需要一個右鍵到左鍵的支持嗎? –

+0

@MarkJames for RTL您的應用應該以/最低sdk版本> 17爲目標。對於mipmap,請檢查您是否具有由ic_launcher命名的圖像資源。對於字符串,請檢查string.xml中是否有「title_activity_maps」。對於Style,請檢查style.xml –

回答

2

因爲你正在使用android:supportsRtl="true"那麼你的targetSdk必須超過17

+0

感謝您的支持。 –

+0

@MarkJames高興地幫助你:) :) :) –

+0

錯誤:配置項目':app'時發生問題。 >無法在哈希字符串'android-10'中找到目標:C:\ Users \ dawnlp \ AppData \ Local \ Android \ Sdk Install missing platform(s) and sync project

1

與您使用的Android版本:supportsRtl = 「真」,那麼你的targetSdk必須在17