0

I have an app with support libraries at version 28. Excerpt of gradle below:

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"
        }
    }
}

All works fine. I then went on to migrate to AndroidX in order to be able to add Firebase Crashlytics in the app.

New (and complete app gradle below). Only additions to the gradle are the firebase/fabric/crashlytics plug-ins and implementation, and the androidx instead of support implementations.

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'

The app builds fine and install and run fine on Samsung S9+ / Api 28 If I try to install the APK on a Moto G / Android 7.1.1 / Api 25, I get the error:

App not installed. The app isn't compatible with your phone

I don't know / haven't found info on whether it's an androidX problem (not running on sdk < 28? I would be surprised) or fabric (also weird?)

Appreciate any help in trying to find out what this is.

Thanks mac

***UPDATE Weirdest thing...

I tested on a local emulator with 7.1.1 If I deploy the application with Android Studio to the emulator, the app launches and traces crashes no problem. If I make an APK and try to download/install the app via download (from the emulator Chrome), then after download I get the error of app not compatible with the phone).

Maurizio Macagno
  • 760
  • 4
  • 15

1 Answers1

0

RESOLVED Not sure what happened, as the first APK I generated had the issue. I cleaned the project, re-synced Gradle and generated another APK and... worked.

Maurizio Macagno
  • 760
  • 4
  • 15
  • I had the same issue. It stopped working for 21 to 25. I can't even use it in my project due to this. –  Jan 24 '20 at 14:59