2017-03-28 162 views
1

科爾多瓦構建Android失敗,這裏有需求的命令輸出和錯誤日誌:科爾多瓦構建Android失敗:java.lang.IllegalStateException:AIDL缺少

cordova requirements 

Requirements check results for android: 
Java JDK: installed 1.8.0 
Android SDK: installed true 
Android target: installed android-23,android-24,android-25 
Gradle: installed 

錯誤日誌:

cordova build android 

BUILD FAILED 

Total time: 18.397 secs 
FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':CordovaLib:compileDebugAidl'. 
> java.lang.IllegalStateException: aidl is missing 

回答

0

1 .-嘗試打開Android SDK並安裝所有可用的API和SDK工具,必要時更新

2.-然後轉到此頁,https://developer.android.com/studio/index.html#downloads d下載tools_r25.2.3-windows.zip,(或MAC或Linux)

3.-解壓並替換該文件夾中/ Android設備/ SDK文件夾

4.-如果問題還沒有解決,然後檢查ANDROID_HOME和PATH位置是正確的。要做到這一點,寫:

export ANDROID_HOME={THE ANDROID SDK PATH}/ export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

0

我面臨同樣的問題,因爲我已經在PATH變量錯誤。 儘量保證,如果你的路徑是否正確或沒有在CMD此評論:

echo %PATH%

你需要使用這兩個路徑

;%ANDROID_HOME%\工具;%ANDROID_HOME%\平臺工具

,你ANDROID_HOME必須是:

C:\ your_SDK_Path \ Android \ sdk

相關問題