urbanairship / react-native-airship

Airship React Native module
Other
88 stars 62 forks source link

Version 1.2.3 broken on Android #53

Closed Jahans3 closed 7 years ago

Jahans3 commented 7 years ago

Thanks for fixing the Message Center title bug!

Unfortunately that release seems to have broken our builds on Android devices as it is unable to resolve a few dependencies.

The following message is produced when building the app, right before it fails (this message does not show on any other version I have tried):

> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':urbanairship-react-native'.
      > Could not resolve all dependencies for configuration ':urbanairship-react-native:_debugPublishCopy'.
         > Could not find com.google.android.gms:play-services-gcm:11.4.0.
           Searched in the following locations:
               file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.pom
               file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
               file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
               file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.pom
               file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
               file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
           Required by:
               HalfordsConsumerApp:urbanairship-react-native:unspecified
         > Could not find com.android.support:support-v4:26.0.2.
           Searched in the following locations:
               file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.pom
               file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
               file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
               file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.pom
               file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
               file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
           Required by:
               HalfordsConsumerApp:urbanairship-react-native:unspecified > com.urbanairship.android:urbanairship-sdk:8.9.4
         > Could not find com.android.support:support-annotations:26.0.2.
           Searched in the following locations:
               file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/android/support/support-annotations/26.0.2/support-annotations-26.0.2.pom
               file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/android/support/support-annotations/26.0.2/support-annotations-26.0.2.jar
               file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/android/support/support-annotations/26.0.2/support-annotations-26.0.2.jar
               file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/26.0.2/support-annotations-26.0.2.pom
               file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/26.0.2/support-annotations-26.0.2.jar
               file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/android/support/support-annotations/26.0.2/support-annotations-26.0.2.jar
           Required by:
               HalfordsConsumerApp:urbanairship-react-native:unspecified > com.urbanairship.android:urbanairship-sdk:8.9.4
         > Could not find com.google.android.gms:play-services-gcm:11.4.0.
           Searched in the following locations:
               file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.pom
               file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
               file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
               file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.pom
               file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
               file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/google/android/gms/play-services-gcm/11.4.0/play-services-gcm-11.4.0.jar
           Required by:
               HalfordsConsumerApp:urbanairship-react-native:unspecified > com.urbanairship.android:urbanairship-sdk:8.9.4
         > Could not find com.android.support:support-v4:26.0.2.
           Searched in the following locations:
               file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.pom
               file:/Users/admin/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
               file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
               file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.pom
               file:/Users/admin/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
               file:/Users/admin/Documents/projects/halfords/halfords-consumer-app/android/sdk-manager/com/android/support/support-v4/26.0.2/support-v4-26.0.2.jar
           Required by:
               HalfordsConsumerApp:urbanairship-react-native:unspecified > com.facebook.react:react-native:0.44.2 > com.android.support:appcompat-v7:23.0.1

Thanks, Josh

rlepinski commented 7 years ago

@Jahans3 You need to add Google's maven repo to your android project. They are no longer going to distribute support libraries through the sdk manager - https://developer.android.com/topic/libraries/support-library/setup.html

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}
Jahans3 commented 7 years ago

@rlepinski thanks, tried that but unfortunately comes back with the following error:

A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':urbanairship-react-native'.
      > Could not resolve all dependencies for configuration ':urbanairship-react-native:_debugPublishCopy'.
         > Could not find any version that matches com.facebook.react:react-native:[0.40,).
           Versions that do not match:
               0.20.1
               0.20.0
               0.19.1
               0.19.0
               0.18.0
               + 12 more
           Required by:
               HalfordsConsumerApp:urbanairship-react-native:unspecified

Will have some time to take another look in the afternoon

rlepinski commented 7 years ago

@Jahans3 Sorry, I just posted the snippet from the doc I linked. You still need the previous listings as well:

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        maven {
            url "https://maven.google.com"
        }
    }
}
Jahans3 commented 7 years ago

Thanks @rlepinski, you've been so helpful!