Android UrbanAirship Crash in takeOff

做~自己de王妃 提交于 2019-11-29 15:48:30

As @ralepinski pointed out. The sample app of UA was working like expected. So I dug deeper into the usage of libraries and gradle and found out, that this Issue was caused by the internal usage of

'com.android.support:support-v4:23.4.0'
'com.android.support:appcompat-v7:23.4.0'

Some of the used plugins use these libraries as well and the conflict was in the usage of different versions of these libraries. I solved this issue by using the force command inside the gradle (see below):

configurations.all {
    resolutionStrategy {
        force 'com.android.support:design:23.4.0'
        force 'com.android.support:support-v4:23.4.0'
        force 'com.android.support:appcompat-v7:23.4.0'
    }
}

I´d like to thank you all for your help and I upvotet @ralepinskis answer which gave the hint to look at the sample project. I do not have enough reputation now but when I have the upvote should be added automatically.

:)

Looks like a breaking change in the support library where an interface is now an abstract class. Make sure 23.3 of the support library and app compat and 8.4 Google place services. Clean and rebuild. You can check the build directory to verify versions. Sometimes other dependencies will pull in newer ones.

This what your gradle should look like and Hope you have added permission in manifest for the same:

repositories {
    jcenter()
    maven { url 'https://maven.fabric.io/public' }
    maven { url 'http://dl.bintray.com/urbanairship/android' }
}

dependencies {
    compile fileTree(include: '*.jar', dir: 'libs')
    compile 'com.google.android.gms:play-services-analytics:8.4.0'
    compile 'com.google.android.gms:play-services-identity:8.4.0'
    compile 'com.google.android.gms:play-services-base:8.4.0'
    compile 'com.google.android.gms:play-services-appindexing:8.4.0'
    compile 'com.google.android.gms:play-services-location:8.4.0'
    compile 'com.google.android.gms:play-services-wearable:8.4.0'
    compile 'com.google.android.gms:play-services-ads:8.4.0'
    compile 'com.google.android.gms:play-services-plus:8.4.0'
    compile project(':PlustxtAsSDK')
    compile 'com.urbanairship.android:urbanairship-sdk:6.4.1'
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!