Android IDE (AIDE) Support Forum

Google services library not working after updating sdk 23.1.1 to 27.1.1

Hello everyone,
I update sdk 23.1.1 to 27.1.1 everything is working fine but when i add any other library like gcm or firebase app get crashed or giving me bug representing in image below

When i add minimumtargetapi to 21 app compiled successfully but crashed without any logcat.
Any idea how its solved?

Gradle here
apply plugin: ‘com.android.application’
apply plugin: ‘com.google.gms.google-services’

android {
compileSdkVersion 29

defaultConfig {
    applicationId "com.androbaron.dailynews"
    minSdkVersion 16
    targetSdkVersion 29
    versionCode 1
    versionName "1.0"
	manifestPlaceholders = [onesignal_app_id: "31a0f765-c8ee-45f5-990d-2bdc380d7b7e",
                            // Project number pulled from dashboard, local value is ignored.
                            onesignal_google_project_number: "REMOTE"]

    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
		android.useAndroidX=true
		android.enableJetifier=true 
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

dependencies {
implementation fileTree(dir: ‘libs’, include: [’*.jar’])
testCompile ‘junit:junit:4.12’
androidTestCompile ‘com.android.support.test:runner:1.0.1’
androidTestCompile ‘com.android.support.test.espresso:espresso-core:3.0.1’
api ‘com.google.android.gms:play-services-location:11.6.0’

implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:support-fragment:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.code.gson:gson:2.2.4'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation('org.apache.httpcomponents:httpmime:4.3.6') {
	exclude module: 'httpclient' 
}
implementation files('libs/OneSignalSDK.jar')
implementation project(':library')
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
implementation 'com.github.chrisbanes:PhotoView:2.0.0'

}

Looks like you exceeded the 64k methods limit in android, solution is to enable multidex, but unfortunately AIDE can’t handle multidex afaik , so reduce your methods count by getting rid of unnecessary libraries, and not making unnecessary references in strings.xml, colors.xml, and unused drawables.

Not really. Multidexing works and I never had issues with it. And I’m successfully building and using a big project ( a music player ). The thing is that AIDE can’t handle all libraries. I always delete firebase and crashlytics libraries from projects and they work fine

So it means that main problem is with external libraries :pensive:, but is mandatory for my app to use firebase.

1 Like

Exactly, it is frustrating. Anyway, keep looking for solutions. My words are not final. I was only talking about my issues and there might be a solution.
P.S. I also always use the 25.+ support libraries because higher versions don’t work properly with big projects.

Use. Appcompat : 5.3.1 & play-services : 8.6.2

Fix minsdk:21 & googleplay-services