使用的gradle版本 'com.android.tools.build:gradle:3.6.0'
android studio>android studio 3.6
sdk版本29
compileSdkVersion 29 buildToolsVersion "29.0.0" defaultConfig { applicationId "com.example.testorignal" minSdkVersion 26 // 这个地方也需要改 targetSdkVersion 29 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" }
编译apk,会报错
修改 appcompat:appcompat 版本如下,重新编译apk,可以编译成功
implementation 'androidx.appcompat:appcompat:1.0.2'
参考 https://mp.weixin.qq.com/mp/appmsgalbum?__biz=Mzg3NDY4NTgxMQ==&action=getalbum&album_id=2065580313983926276&scene=173&from_msgid=2247483861&from_itemidx=1&count=3&nolastread=1#wechat_redirect