android - 我的应用无法安装在 Android 11 上,但可以在旧版本中使用
问题描述
我有一个问题,我昨晚刚刚将我的设备更新到 android 11,而我的应用程序似乎没有安装在 android 11 上。即使在尝试完成安装后也会恢复到安装按钮。知道我做错了什么吗?这是我的 build.gradle 的一个片段:
compileSdkVersion 30
buildToolsVersion "30.0.2"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "myapp.android"
minSdkVersion 23
targetSdkVersion 30
versionCode 44
versionName "1.1.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
解决方案
尝试升级你的gradle。
之后 File -> Invalidate caches and Restart you Android studio。
classpath 'com.android.tools.build:gradle:4.1.2'
在 gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
推荐阅读
- python - 使用请求和正则表达式从网页中提取隐藏的电子邮件
- reactjs - reactjs中setState中数组的过滤数据
- python - 谷歌云存储:ModuleNotFoundError
- javascript - 如何在已经裁剪的图片上添加水印?
- arrays - 如何在定义的数组中查找值
- javascript - React Jest 测试按钮点击调用一个函数
- python - KivyMD - MDTabs - 如何获取当前活动标签名称?
- node.js - 如何在 Mongoose 中通过引用的对象的属性查找?
- python - 如何将多个 QuerySet 值传递给 filter()
- python - 从上二维矩阵获取最小值索引的可能优化