[英]Android Studio refactor app icons
好像您在命名新圖標ic_icone
。 但是,如果您不想編輯清單,則啟動器圖標需要命名為ic_launcher
。 如果要調用ic_icone
,則必須編輯清單並替換android:icon
的值以ic_icone
而不是ic_launcher
為目標。
TL; DR:將名稱更改為ic_launcher
,或更改清單中android:icon
的值
您需要將它們重命名為與原始圖標相同的名稱(它們必須放置在同一文件夾中(右鍵單擊>在資源管理器中顯示),請記住,有兩組圖標,常規和圓形(以防萬一)。
也可能是因為它們已經被替換,但是沒有為您加載(舊計算機),所以如果不加載它們,請確保轉到“文件”>“使緩存無效並重新啟動”
為您的答案致謝黑暗與佐伊! 嘗試您的技巧,問題仍然存在。
經過另一次檢查,我發現即使進行了重構,有些變量也不會像預期的那樣變化。
例如:在build.gradle(Module:app)中
android {
compileSdkVersion 27 -------------> Old one was 26
defaultConfig {
applicationId "rtomas.wool" -----------> This fill don't change with refactor. I need to change it manually to the new one.
minSdkVersion 22
targetSdkVersion 27 -------------> Old one was 26
versionCode 1
versionName "2.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
依賴項{實現fileTree(dir:'libs',包括:['* .jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'-------------> Old one was 26
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:27.1.1'-------------> Old one was 26
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.esri.arcgisruntime:arcgis-android:100.2.1'
implementation 'com.android.support:support-v4:27.1.1'-------------> Old one was 26
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
輸入完提示后,更改“ applicationId”名稱,更新“ targetSdkVersion”,即可解決問題的所有依賴性!
需要注意的是,我正在7.0安卓版本上測試我的應用程序。
很多東西! :)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.