Search code examples
androidandroid-studioadmobactionbarsherlock

Crash when adding Firebase for Google Ads in gradle


I am trying to add in an older project google ads banner, but when I add to the Grandle the Firebase and run the app it crashes:

This is my gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion '25.0.2'

defaultConfig {
    applicationId "com...."
    minSdkVersion 15
    targetSdkVersion 22
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
}

dependencies {
compile 'com.google.firebase:firebase-ads:10.2.0'
compile 'com.android.support:support-v4:22.2.0'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile files('libs/pinch-0.8.jar')
compile files('libs/signpost-commonshttp4-1.2.1.1.jar')
compile files('libs/signpost-core-1.2.1.1.jar')
compile files('libs/signpost-jetty6-1.2.1.1.jar')
compile files('libs/twitter4j-async-3.0.3.jar')
compile files('libs/twitter4j-core-3.0.3.jar')
compile files('libs/twitter4j-examples-3.0.3.jar')
}
apply plugin: 'com.google.gms.google-services'

and this is the error message enter image description here

The first version of the project was developed with Eclipse.


Solution

  • This is because firebase uses new version of android support lib while actionbarsherlock relies on old version. If you still want to use actionbarsherlock you will need to make some changes into it, see here