android studio bug : aidl is missing 解決方案

來源:互聯網
上載者:User

標籤:aidl   一段   修改   admin   html   自動更新   ima   verify   miss   

很久不開啟Android studio 今天開啟一下,發現之前配置好的開發環境不能用了!

項目中“R.”變紅了,運行結果如下,可以說很怪,電腦沒動過,怎麼回事呢?

於是StackOverflow一下:

找到一段可能有用的話:

“This bug happens when the versions of SDK, Build Tools and Gradle Plugins doesn‘t match (in terms of compatibility). The solution is to verify whether you are using the latest version of them or not. The gradle plugins are placed in the build.gradle of the project, and the other versions are on the build.gradle of the module. For example, for SDK 23, you must use the Build Tools 23.0.1 and gradle plugins version 1.3.1.”

這時,我想應該是有些東西封裝更新了,有些包沒更新導致的不匹配。又或者是那個360軟體把裡面的某個東西當做毒殺叼了。

 

這裡面有3個東西的版本,在我電腦的東西:

1、SDK:(在我電腦中的位置C:\Users\Administrator\AppData\Local\Android\sdk)

下載最新SDK,AS:file/setting/Android SDK/SDK platforms/選擇最新的Android API 下載,這裡用API 27.

 

 

2、Build Tools:

AS會根據.gradle檔案上寫的版本號碼下載對應的tools。開啟app檔案夾下的build.gradle檔案。

 

修改這兩個參數。更改為最新版本,build tools就可以自動下載。(如果之後更新的話,去百度,Google找最新的對應關係。)

compileSdkVersion 27
buildToolsVersion "27.0.3"

3、Gradle Plugins:(在我電腦中的位置:C:\Program Files\Android\Android Studio\gradle\gradle-4.7-all\gradle-4.7)

AS與Gradle版本之間的對應關係如下,我AS是2.3.3版本,所以只要是3.3以上的Gradle都可以用。這裡我用的是4.7

 

 

 問題得到解決。ok

 

總結,這個問題應該是360誤殺了這個包中的部分檔案導致不可用,因為之前是配置好的,我檢查了一下自己並沒有設定自動更新,每次更新都是需要我確認的。所以各位在處理這個問題的時候,要把360關掉。

總之出現這個問題,只要更新這3個部分就應該可以解決!

 

android studio bug : aidl is missing 解決方案

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.