2015-01-08 65 views
0

我有這樣的佈局,並在清單中,我把線android:icon="@drawable/ic_launcher",但不顯示的應用程序圖標...的應用程序圖標丟失/不出現機器人工作室

佈局的內容:

<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:paddingLeft="@dimen/activity_horizontal_margin" 
    android:paddingRight="@dimen/activity_horizontal_margin" 
    android:paddingTop="@dimen/activity_vertical_margin" 
    android:paddingBottom="@dimen/activity_vertical_margin" 
    tools:context=".java0" 
    tools:ignore="MergeRootFrame" 
    android:screenOrientation="portrait" 
    android:icon="@drawable/ic_launcher" 
    android:background="#ffff7e00"> 
</RelativeLayout> 

清單的內容:

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="theapp.application.app.theapp" > 

    <!-- Include required permissions for Google Mobile Ads to run--> 
    <uses-permission android:name="android.permission.INTERNET"/> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> 

    <!--Agregado: Pantallas--> 
    <supports-screens 
     android:resizeable="true" 
     android:smallScreens="true" 
     android:normalScreens="true" 
     android:largeScreens="true" 
     android:xlargeScreens="true" 
     android:anyDensity="true"/> 

    <application 
     android:screenOrientation="portrait" 
     android:allowBackup="true" 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@style/AppTheme"> 
     <!--This meta-data tag is required to use Google Play Services.--> 
     <meta-data android:name="com.google.android.gms.version" 
      android:value="@integer/google_play_services_version" /> 

     <activity 
      android:screenOrientation="portrait" 
      android:name=".java0" 
      android:label="@string/app_name" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
     <!--Include the AdActivity configChanges and theme. --> 
     <activity android:name="com.google.android.gms.ads.AdActivity" 
      android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" 
      android:theme="@android:style/Theme.Translucent" /> 

     <activity 
      android:screenOrientation="portrait" 
      android:name=".java1" 
      android:label="@string/app_name" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
      </intent-filter> 
     </activity> 

     <activity 
      android:screenOrientation="portrait" 
      android:name=".java2" 
      android:label="@string/app_name" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
      </intent-filter> 
     </activity> 



    </application> 
</manifest> 
+0

你的類名java0重命名爲Java的。檢查我的更新答案:) –

+0

我有同樣的問題ñ得到了解決方案也 –

+0

按照這個http://stackoverflow.com/questions/8133954/launcher-icon-missing-in-android –

回答

0

manifest結構應該像Android Studio

<?xml version="1.0" encoding="utf-8"?> 
     <manifest xmlns:android="http://schemas.android.com/apk/res/android" 
        package="com.org.yourpackage" > 
     <application 
     android:allowBackup="true" 
      android:icon="@drawable/ic_launcher" 
      android:label="@string/app_name" 
      android:theme="@style/AppTheme" > 
      <activity 
       android:name=".YourStartingActivity" 
       android:label="@string/app_name" > 
       <intent-filter> 
        <action android:name="android.intent.action.MAIN" /> 
        <category android:name="android.intent.category.LAUNCHER" /> 
       </intent-filter> 
      </activity> 

     </application> 

    </manifest> 

注:透明背景你應該使用

android:style/Theme.Translucent 

,並就重命名你所有的Java類名(含上限開始吧..)

+0

完成,謝謝你的回答。 –

+0

歡迎:) –

+0

是的,但是...現在什麼?我只粘貼完整的清單文件,應用程序圖標仍然丟失。 –

相關問題