我想将我的Android Android插件从2.3.3升级到3.0.1。我可以修复Migration Guide之后的所有错误。我现在的问题是,Android Nougat(24)和Android Marshmallow(23)应用程序图标被替换为默认的机器人图标。将Gradle插件更新至3.0后未显示应用程序图标
你能帮我找出问题的原因吗?以前的图标显示,我不明白为什么现在不合逻辑的原因。
我试过所有建议here没有成功。
这里是我的清单文件:
<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
...
<application
android:name="...Application"
android:allowBackup="false"
android:allowTaskReparenting="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/application"
android:largeHeap="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/Theme.MyTheme"
tools:replace="android:icon,theme,label,allowBackup">
<uses-library android:name="com.google.android.maps" />
<activity
android:name="...SplashActivity"
android:label="@string/application"
android:theme="@style/Theme.Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
...
</application>
这里是项目摇篮文件:
buildscript {
ext.kotlinVersion = '1.2.10'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
allprojects {
ext {
androidApplicationId = 'myapp.android'
androidVersionCode = 1
androidVersionName = "1.0"
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
}
repositories {
maven { url "https://maven.google.com" }
}
}
你检查了什么是可用的资源对这个值'ic_launcher_round' –
我更新了我的android studio没有你的问题,我认为你应该清理你的项目。 – salman
@AbdulWaheed我检查了图标,他们是我的应用程序图标按预期。 –