我有一个28版支持库的应用程序。以下节选:
android {
compileSdkVersion 28
defaultConfig {
applicationId "XXXX"
minSdkVersion 21
targetSdkVersion 28
versionCode 112
versionName "XXXX"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "-frtti -fexceptions"
}
}
}
一切正常。然后,我继续迁移到AndroidX,以便能够在应用程序中添加Firebase Crashlytics。
新的(并完成下面的应用程序分级)。只有在gradle中增加的是firebase/fabric/crashlytics插件和实现,以及androidx而不是支持实现。
apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao'
apply plugin: 'io.fabric'
// Enable Crashlytics NDK reporting
crashlytics {
enableNdk true
}
android {
compileSdkVersion 28
defaultConfig {
applicationId "XXX"
minSdkVersion 21
targetSdkVersion 28
versionCode 112
versionName "XXX"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "-frtti -fexceptions"
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
packagingOptions {
exclude 'thirdpartynotice.txt'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'me.tankery.lib:circularSeekBar:1.1.7'
// Graph View
implementation 'com.jjoe64:graphview:4.2.2'
/*Dependency for glide library*/
implementation 'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
implementation 'org.greenrobot:greendao:3.2.2'
// add library
// RecyclerView
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation files('libs/sensorialibrary.jar')
implementation 'no.nordicsemi.android.support.v18:scanner:1.1.0'
// google vision library
implementation 'com.google.android.gms:play-services-vision:17.0.2'
// Azure IoT Central API.
implementation 'androidx.multidex:multidex:2.0.0'
api 'com.microsoft.azure.sdk.iot:iot-device-client:1.17.1'
// API Access
implementation 'com.android.volley:volley:1.1.1'
**// Firebase SDK
implementation 'com.google.firebase:firebase-analytics:17.2.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.1.0'**
}
apply plugin: 'com.google.gms.google-services'
如果我尝试在Moto /Android7.1.1/ Api 25上安装APK,则该应用程序在三星S9+ / Api 28上安装并运行良好,我得到了错误:
未安装
应用程序。这个应用程序和你的手机不兼容
我不知道/没有找到关于它是否是androidX问题的信息(不是在sdk < 28上运行吗?)我会感到惊讶)或织物(也奇怪?)
感谢任何帮助,试图找出这是什么。
谢谢麦克
最奇怪的事..。
我用7.1.1在本地模拟器上进行了测试,如果我将应用程序与Android一起部署到模拟器中,应用程序就会启动并跟踪崩溃。如果我制作了一个APK并尝试通过下载(从模拟器Chrome)下载/安装应用程序,那么在下载之后,我会得到与手机不兼容的应用程序的错误。
发布于 2019-09-23 16:29:57
解决了不确定发生了什么,因为我产生的第一个APK出现了问题。我清理了项目,重新同步了Gradle,并产生了另一个APK和.起作用了。
https://stackoverflow.com/questions/58065462
复制相似问题