Android UrbanAirship Crash in takeOff

前端 未结 3 1855
悲哀的现实
悲哀的现实 2020-12-21 09:13

Hello I hope someone can help me here.

I´m working on an application which uses UrbanAirship to receive PushNotifications.

My Problem is that, s

相关标签:
3条回答
  • 2020-12-21 09:53
    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'
    }
    
    0 讨论(0)
  • 2020-12-21 09:56

    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.

    :)

    0 讨论(0)
  • 2020-12-21 10:13

    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.

    0 讨论(0)
提交回复
热议问题