Android Studio:Could not find any version that matches com.android.support:appcompat-v7:30.+.


Android build出現如標題的錯誤. 其中版本可能是30或者29.
修改報錯的build.gradle. 一般來說該文件屬於一個module.

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
//  implementation 'com.android.support:appcompat-v7:30+' 改為如下行
    implementation 'com.android.support:appcompat-v7:+'
    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'
}

然后build - rebuild project. 不行的話重啟工具.

support library 最后版本為28

遷移說明 https://developer.android.google.cn/jetpack/androidx/migrate

Note: With the release of Android 9.0 (API level 28) there is a new version of the support library called AndroidX which is part of Jetpack. The AndroidX library contains the existing support library and also includes the latest Jetpack components.
You can continue to use the support library. Historical artifacts (those versioned 27 and earlier, and packaged as android.support.*) will remain available on Google Maven. However, all new library development will occur in the AndroidX library.
We recommend using the AndroidX libraries in all new projects. You should also consider migrating existing projects to AndroidX as well.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM