react-native-background-geolocation icon indicating copy to clipboard operation
react-native-background-geolocation copied to clipboard

Not work with compileSdkVersion 29

Open invyctus92 opened this issue 4 years ago • 5 comments

Not work with compileSdkVersion 29

  • Plugin version: 0.6.3
  • Platform: Android
  • OS version: 10
  • Device manufacturer and model: Oneplus 6
  • React Native version: 0.59.10

Hello, I have updated compileSdkVersion, to match the new conditions of android, from 28 to 29. Now the package doesn't work, after start, it starts the process related to the start event but after the app freeze and after crasha, you can give me a hand. Thanks

build.gradle `// Top-level build file where you can add configuration options common to all sub-projects/modules.

ext { compileSdkVersion = 29 targetSdkVersion = 29 buildToolsVersion = "29.0.3" supportLibVersion = "29.0.3" // googlePlayServicesVersion = "11.8.0" // googlePlayServicesVersion = "9.8.0" googlePlayServicesVersion = "+" gradle3EXPERIMENTAL = "yes" googlePlayServicesAuthVersion = "16.0.1"

// firebaseVersion = "17.3.4" // default: "+"

}

buildscript { repositories {

    jcenter()
    
    maven {
      url "https://maven.google.com"
    }
    
    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.fabric.io/public' } // fabric & crashlytics

    google()

}

dependencies { classpath 'com.android.tools.build:gradle:3.4.1'

  classpath 'com.google.gms:google-services:4.3.2'  // Google Services plugin
  classpath 'io.fabric.tools:gradle:1.+' // fabric & crashlytics
  
  classpath 'com.bugsnag:bugsnag-android-gradle-plugin:3.+'

  classpath 'com.google.gms:google-services:4.3.2'

  // NOTE: Do not place your application dependencies here; they belong
  // in the individual module build.gradle files

} }

allprojects { repositories { mavenLocal() google() // <-- Add this line above jcenter jcenter()

    mavenLocal()
    maven { url 'https://jitpack.io' }
    maven {
      url "https://maven.google.com"
    }
    maven {
      // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
      url "$rootDir/../node_modules/react-native/android"
    }
    maven {
      url "$rootDir/../node_modules/react-native-background-fetch/android/libs"
    }
    google()
    jcenter()
    
     configurations.all {
        resolutionStrategy {
            force "com.android.support:appcompat-v7:$supportLibVersion"
        }
    }
}
//add the folllowing lines to force libs to use recent buildtools
subprojects {
    afterEvaluate {
        project ->
            if (project.hasProperty("android")) {
                android {
                    compileSdkVersion = 29
                    buildToolsVersion = "29.0.3"
                    
                }
            }
    }
}

}

`

invyctus92 avatar Sep 11 '20 15:09 invyctus92

Same +1

nopmengkoung avatar Oct 16 '20 02:10 nopmengkoung

same here

jacobusg avatar Nov 22 '20 13:11 jacobusg

same +1

Adigezalov avatar Nov 25 '20 07:11 Adigezalov

Same for me, I get this error: image

aljaz00 avatar Dec 02 '20 06:12 aljaz00

Tested it with compileSdkVersion 29, first I got exception error in logcat and app freezes on BackgroundGeolocation.start(). Try to add:

implementation 'com.google.android.gms:play-services-location:15.0.1'

into dependencies in app/build.gradle

That resolved problem in my case.

MilosR avatar Dec 25 '20 23:12 MilosR