關於The specified Android SDK Build Tools version (26.0.2) is ignored, as it is below the minimum...


今天將項目遷移到另一台筆記本,進行build出現以下問題,導致build失敗

The specified Android SDK Build Tools version (26.0.2) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.1. Android SDK Build Tools 27.0.3 will be used. To suppress this warning, remove "buildToolsVersion '26.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools. Update Build Tools version and sync project Open File
  • 1
  • 2
  • 3
  • 4

大致意思,目前使用的build工具版本26.0.2不合適。因為當前使用Gradle插件版本是3.1.1,這個版本至少需要build對應版本為27.0.3 
而且,現在每一個Gradle插件版本都對應一個build工具版本,不能混用

從上述內容看出,需要修改build對應的版本,

android {
    //xxxx buildToolsVersion '27.0.3' //xxxxx }
  • 1
  • 2
  • 3
  • 4
  • 5

這里需要注意,如果項目本身還依賴其他lib,也要記得修改對應的build.gradle 
重新build,正常


免責聲明!

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



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