2017-02-25 45 views
0

這是我AndroidManifiest.xml文件 他們是2誤差 發現在包的Android 屬性「launchmode」沒有資源標識符沒有資源標識符發現屬性「stateNotNeeded」 in package android發現屬性「launchmode」在包裝機器人沒有資源標識符

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="a52.puri.fbkunal.com.launcher"> 

    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:supportsRtl="true" 
     android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen" 
     android:launchMode="singleTask" 
     android:stateNotNeeded="true" 
     android: 
     > 
     <activity android:name=".MainActivity"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 

      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
       <category android:name="android.intent.category.HOME" /> 
      </intent-filter> 
     </activity> 
    </application> 

</manifest> 
+0

可能的[錯誤:包'com.google.example'\t main.xml]中屬性'adSize'的資源標識符重複(http://stackoverflow.com/questions/5819369/error-no-resource -identifier-found-for-attribute-adsize-in-package-com-googl) – nobalG

+0

爲什麼你的'application'選項卡的最後一個屬性被吃掉了? ('機器人:') –

回答

1

launchMode分配到Activity中,而不是應用程序標籤中。 基本上,我們可以直接指定一個launchMode爲AndroidManifest.xml文件列表這裏面<activity>標籤的屬性:

<activity 
    android:name=".SingleTaskActivity" 
    android:label="singleTask launchMode" 
    android:launchMode="singleTask"> 
1

您要爲application標籤,launchMode在Android是活動指定未知屬性。活動啓動並對用戶可見,但在啓動應用程序時應用程序只啓動一次。你可以說應用程序是Android應用程序的一個起點。

相關問題