2 回答

TA貢獻1895條經(jīng)驗 獲得超3個贊
你有什么版本的安卓工作室?根據(jù)這里:https : //developer.android.com/jetpack/androidx/migrate Android studio 必須是 3.2 或更高版本。如果您的 android studio 現(xiàn)在是 3.2 或更高版本,則在 Refactor 選項卡下有一個選項 - “Migrate to AndroidX” 等待它編譯所有內容,AS 會將您現(xiàn)有的項目遷移到 androidX,這就是您正在尋找的材料。
如果你可能會問,這是我對 androidx 的依賴:
implementation 'androidx.appcompat:appcompat:1.0.0-rc01'
implementation 'com.google.android.material:material:1.0.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
添加回答
舉報