青春须早为,岂能长少年。这篇文章主要讲述应用程序图标缺失/未出现android studio相关的知识,希望能为你提供帮助。
我有这个布局,在清单中,我放置了行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="https://www.songbingjia.com/android/@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>
答案你的
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
【应用程序图标缺失/未出现android studio】并重命名所有的java类名称(以大写字母开头..)
推荐阅读
- 如何将xml文件保存在我想要的目录中(android studio)[关闭]
- Android资源链接失败('à¥?dp'与属性layout_marginBottom(attr)维度不兼容)
- 将形状添加到LinearLayout Android
- 如何将IStringLocalizer注入IApplicationModelConvention()
- 考虑在配置中定义类型为“com.gisapp.gisapp.dao.IUserDAO”的bean
- 如何在Spring Boot Application中使用JPA删除/ getList
- 带有@RequestParam和@RequestBody的Spring @GetMapping因HttpMessageNotReadableException而失败
- Xcode 8 App安装失败,出现未知错误
- Ad Hoc发布Xcode 10,App无法正常工作