React-native-background-geolocation: play services base dependency fail compilation

Created on 30 Apr 2017  路  4Comments  路  Source: mauron85/react-native-background-geolocation

Your Environment

  • Plugin version: tried with both 0.2.0-alpha.6 and alpha.7
  • Platform: Android
  • OS version: Windows 10.1
  • React Native version: 0.42.0

Context

After running react-native run-android I get the following error. Can't build

C:UsersMyNameworkspaceMyProjectnode_modulesreact-native-mauron85-background-geolocationandroidlibbuildintermediatesexploded-aarcom.google.android.gmsplay-services-base10.2.4resdrawablecommon_google_signin_btn_icon_dark_normal.xml:3:29-91 : No resource found that matches the given name (at 'drawable' with value '@drawable/common_google_signin_btn_icon_dark_normal_background').
C:UsersMyNameworkspaceMyProjectnode_modulesreact-native-mauron85-background-geolocationandroidlibbuildintermediatesexploded-aarcom.google.android.gmsplay-services-base10.2.4resdrawablecommon_google_signin_btn_icon_light_normal.xml:3:29-92 : No resource found that matches the given name (at 'drawable' with value '@drawable/common_google_signin_btn_icon_light_normal_background').
C:UsersMyNameworkspaceMyProjectnode_modulesreact-native-mauron85-background-geolocationandroidlibbuildintermediatesexploded-aarcom.google.android.gmsplay-services-base10.2.4resdrawablecommon_google_signin_btn_text_dark_normal.xml:3:29-91 : No resource found that matches the given name (at 'drawable' with value '@drawable/common_google_signin_btn_text_dark_normal_background').
C:UsersMyNameworkspaceMyProjectnode_modulesreact-native-mauron85-background-geolocationandroidlibbuildintermediatesexploded-aarcom.google.android.gmsplay-services-base10.2.4resdrawablecommon_google_signin_btn_text_light_normal.xml:3:29-92 : No resource found that matches the given name (at 'drawable' with value '@drawable/common_google_signin_btn_text_light_normal_background').

:react-native-mauron85-background-geolocation:processReleaseResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-mauron85-background-geolocation:processReleaseResources'.
    > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:UsersMyNameAppDataLocalAndroidSdkbuild-tools23.0.3aapt.exe'' finished with non-zero exit value 1

Most helpful comment

A good way to fix this issue especially if you're getting something like this :
Unknown source file : com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzas;

First make sure it ignores the google.gms by setting in .../app/build.gradle :

compile project(':react-native-mauron85-background-geolocation') { exclude group: 'com.google.android.gms' }

and then adding this to your .../app/build.gradle :
compile ('com.google.android.gms:play-services-location:10.0.1') { force = true }

10.0.1 being the version you're referencing throughout your project.

All 4 comments

Fixes somehow by setting

compile 'com.google.android.gms:play-services-location:9.8.0'

instead of "...play-services-location:+"
Should be a dependency issue in my project..

Notice: this issue has been closed because it has been inactive for 203 days. You may reopen this issue if it has been closed in error.

A good way to fix this issue especially if you're getting something like this :
Unknown source file : com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzas;

First make sure it ignores the google.gms by setting in .../app/build.gradle :

compile project(':react-native-mauron85-background-geolocation') { exclude group: 'com.google.android.gms' }

and then adding this to your .../app/build.gradle :
compile ('com.google.android.gms:play-services-location:10.0.1') { force = true }

10.0.1 being the version you're referencing throughout your project.

@Zenger it works :1st_place_medal: ! Thank you very much.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikailbayram picture mikailbayram  路  4Comments

Daavidaviid picture Daavidaviid  路  3Comments

MRolandd picture MRolandd  路  6Comments

Batuhan-Akkaya picture Batuhan-Akkaya  路  4Comments

arochedy picture arochedy  路  5Comments