Android Studio導(dǎo)入項(xiàng)目不支持的兩種解決方式
今天open項(xiàng)目到AS時(shí),IDEA拋出如下錯(cuò)誤:This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 4.1 or newer.
根本原因是該項(xiàng)目的gradle版本太新,但是AS不支持。
兩種解決方式:
1.升級(jí)Android Studio到4.1及以上版本2.調(diào)整該項(xiàng)目的gradle plugin版本到AS對(duì)應(yīng)支持版本及以下
對(duì)于方式1,個(gè)人不是特別推薦,特別是用于一直開發(fā)公司項(xiàng)目的PC。
方式2
步驟1:
調(diào)整項(xiàng)目build.gradle文件配置: 原本配置為:
classpath 'com.android.tools.build:gradle:4.1.0'
我按照我當(dāng)前的AS版本(我使用的3.6.1)支持,調(diào)整后為:
步驟2:
調(diào)整項(xiàng)目gradle-wrapper.properties文件對(duì)應(yīng)步驟1中設(shè)置的版本。
步驟3:重新sync后即可。
到此這篇關(guān)于Android Studio導(dǎo)入項(xiàng)目不支持的兩種解決方式的文章就介紹到這了,更多相關(guān)Android Studio導(dǎo)入項(xiàng)目?jī)?nèi)容請(qǐng)搜索好吧啦網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持好吧啦網(wǎng)!
相關(guān)文章:
1. 基于 Python 實(shí)踐感知器分類算法2. Python如何批量生成和調(diào)用變量3. ASP.NET MVC實(shí)現(xiàn)橫向展示購(gòu)物車4. 通過(guò)CSS數(shù)學(xué)函數(shù)實(shí)現(xiàn)動(dòng)畫特效5. ASP.Net Core對(duì)USB攝像頭進(jìn)行截圖6. python利用opencv實(shí)現(xiàn)顏色檢測(cè)7. ASP.Net Core(C#)創(chuàng)建Web站點(diǎn)的實(shí)現(xiàn)8. Python 中如何使用 virtualenv 管理虛擬環(huán)境9. Python獲取B站粉絲數(shù)的示例代碼10. windows服務(wù)器使用IIS時(shí)thinkphp搜索中文無(wú)效問題
