2017-02-25 55 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应用程序的一个起点。

相关问题