android - 我的应用在运行 Android 版本低于 9 的设备上崩溃
问题描述
我正在三星远程实验室测试我的应用程序,发现它在运行低于 9 的 Android 设备上不断崩溃。
在谷歌上搜索只会让我更加困惑,并意识到我的无知是多么巨大。
build.cradle:
android {
compileSdkVersion 28
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.photobangkok.moneytalk"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.google.android.gms:play-services-ads:20.1.0'
}
当我尝试将 minSDKversion 降低到 14 时,出现以下错误:
清单合并失败:uses-sdk:minSdkVersion 14...
我在这个应用程序中展示广告,所以我需要使用 adroidx。
解决方案
推荐阅读
- javascript - 带有 Wordpress 的 Anime.js:未定义模块
- typescript - 打字稿函数重载太大的文件
- c++ - 无法使用 OpenVino 推理编译 OpenCV,无法读取 cpuid.txt
- matlab - 如何使用 ODE45(涉及代数方程)求解这个由 5 个方程组成的系统?
- cpu - 计算机 CPU 中的寄存器
- ruby-on-rails - 在 localhost 上配置 facebook 登录
- python-2.7 - 如何在 Python 中找到两个日期之间的差异?
- java - 我如何使用 Exsel 文件中的(Dataprovider)运行 testng 代码
- php - 使用 php 服务器读取 python 输出
- android - 底部文本在 TabLayout 上消失