AndroidStudio中提示:This project uses AndroidX dependencies, but the ‘android.useAndroidX‘ property is not enabled


場景

Android Studio中在新建項目時勾選了

Use legacy android.support licrary

 

 

然后在運行項目時提示:

This project uses AndroidX dependencies, but the ‘android.useAndroidX‘ property is not enabled

 

 

博客:
https://blog.csdn.net/badao_liumang_qizhi
關注公眾號
霸道的程序猿
獲取編程相關電子書、教程推送與免費下載。

實現

打開項目下gradle.properties

添加如下兩行代碼

android.useAndroidX=true
android.enableJetifier= true

添加位置如下

 

 


免責聲明!

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



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