我想將我的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我檢查了圖標,他們是我的應用程序圖標按預期。 –