Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution failed for task ':react-native-fused-location:processReleaseResources'. #21

Open
Kotdnz opened this issue Mar 22, 2018 · 7 comments

Comments

@Kotdnz
Copy link

Kotdnz commented Mar 22, 2018

Try to edit
node_modules\react-native-fused-location\android\build.gradle and change versiob from + to 11.8.0:
dependencies { compile 'com.facebook.react:react-native:+' compile 'com.google.android.gms:play-services-location:11.8.0' }

@kenmistry
Copy link

kenmistry commented Mar 23, 2018

i am facing this error instead:

Error: more than one library with package name 'com.google.android.gms.license'

it seems to be related to the latest update of Google Play Services 12.0.0 as explained here. i have tried downgrading to com.google.android.gms:play-services-location:11.6.0 from 11.8.0, but it didnt work.

@MustansirZia
Copy link
Owner

@Kotdnz, @kenmistry I will take a look into this.

@Kotdnz
Copy link
Author

Kotdnz commented Mar 26, 2018

@MustansirZia thank you - will wait.

Additional info from log & yellowbox with 11.8.0 (with 11.6.0 - all working as axpected:
03-26 09:01:22.765 23354 23448 W ReactNativeJS: Possible Unhandled Promise Rejection (id: 0):
03-26 09:01:22.765 23354 23448 W ReactNativeJS: TypeError: undefined is not an object (evaluating 'subscription.eventName')

@Kotdnz
Copy link
Author

Kotdnz commented Mar 27, 2018

i made the test and as result - no yellow box warning if comment componentWillMount
Looks like this.subscription is, in fact, undefined when invoking

/* async componentWillMount() {
FusedLocation.off(this.subscription);
// FusedLocation.off(this.errSubscription);
FusedLocation.stopLocationUpdates();
}
*/

@MustansirZia
Copy link
Owner

MustansirZia commented Mar 29, 2018

Hi @Kotdnz @kenmistry! Will you kindly share your project build.grade and your app's build.gradle files here so I may look into the issue further?
Also, please let me know if you tried this solution that's mentioned here and if it worked?

Finally, if it isn't too much trouble, please let me know your Google Play Services version and Android SDK tools version that is inside your Android Studio. :)

@Kotdnz
Copy link
Author

Kotdnz commented Mar 29, 2018

c:\Users\Kostiantyn\AppData\Local\Android\Sdk\TimeSys\node_modules\react-native-fused-location\android\build.gradle

`buildscript {
repositories {
jcenter()
}

dependencies {
    classpath 'com.android.tools.build:gradle:2.1.0'
}

}

apply plugin: 'com.android.library'

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"

defaultConfig {
    minSdkVersion 16
    targetSdkVersion 25
    versionCode 1
    versionName "0.1"
}
lintOptions {
    abortOnError false
}

}

dependencies {
compile 'com.facebook.react:react-native:+'
compile 'com.google.android.gms:play-services-location:11.6.0'
} `

  1. Yes. Changing the version to 11.6.0 resolved the issue. Together with commented Willmount - all working as expected.

  2. I'm using CLI
    Android SDK tools - 26.1.1
    Google Play Services - 48

@kenmistry
Copy link

hi @MustansirZia, i did try a workaround similar to the link you shared. you can see this in my build.gradle files below. i am not facing the aforementioned error and build is successful if this workaround is in place.

my project's build.gradle:

    defaultConfig {
        applicationId "com.vediohead"
        minSdkVersion 16
        targetSdkVersion 23
        multiDexEnabled true
        versionCode 22
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }

dependencies {
    implementation project(':react-native-orientation')
    implementation project(':react-native-gps-state')
    implementation project(':react-native-android-location-enabler')
    implementation project(':react-native-maps')
    implementation project(':react-native-fused-location')
    .
    .
    .
    .
    implementation project(':react-native-fbsdk')
    .
    .
    .
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:23.0.1'
    implementation 'com.facebook.fresco:animated-gif:1.3.0'
    implementation 'com.facebook.react:react-native:+'
    // From node_modules
    implementation 'com.android.support:multidex:1.0.1'
    // RNFirebase required dependencies
    implementation (project(':react-native-firebase')) {
        transitive = false
    }
    implementation ("com.google.android.gms:play-services-location:$project.googlePlayServicesVersion") {
        force = true;
    }
    implementation ("com.google.android.gms:play-services-auth:$project.googlePlayServicesVersion") {
        force = true;
    }
    implementation ("com.google.android.gms:play-services-base:$project.googlePlayServicesVersion") {
        force = true;
    }
    implementation ("com.google.android.gms:play-services-maps:$project.googlePlayServicesVersion") {
        force = true;
    }
    implementation ('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
        transitive = true;
    }
    implementation ("com.google.firebase:firebase-core:$project.googlePlayServicesVersion") {
        force = true;
    }
    implementation ("com.google.firebase:firebase-analytics:$project.googlePlayServicesVersion") {
        force = true;
    }
    implementation ("com.google.firebase:firebase-auth:$project.googlePlayServicesVersion") {
        force = true;
    }
    implementation ("com.google.firebase:firebase-config:$project.googlePlayServicesVersion") {
        force = true;
    }
    implementation ("com.google.firebase:firebase-database:$project.googlePlayServicesVersion") {
        force = true;
    }
    implementation ("com.google.firebase:firebase-messaging:$project.googlePlayServicesVersion") {
        force = true;
    }
    implementation ("com.google.firebase:firebase-perf:$project.googlePlayServicesVersion") {
        force = true;
    }
    implementation ("com.google.firebase:firebase-storage:$project.googlePlayServicesVersion") {
        force = true;
    }
    implementation ("com.google.firebase:firebase-crash:$project.googlePlayServicesVersion") {
        force = true;
    }
}

apply plugin: "com.google.gms.google-services"

my app's build.gradle:

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.google.gms:google-services:3.2.0'
    }
}

ext {
    googlePlayServicesVersion = '11.8.0'
    compileSdkVersion = 26
    buildToolsVersion = '26.0.2'
    supportLibrariesVersion = '26.1.0'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants