transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.66k stars 425 forks source link

App crush on start - Android only #560

Closed tomershohet closed 6 years ago

tomershohet commented 6 years ago

Environment

Hi, On ios, everything works fine but on Android the app crash when it starts: The error I get is:

09-12 14:39:37.737 25666-25666/? E/Zygote: isWhitelistProcess - Process is Whitelisted
09-12 14:39:37.739 25666-25666/? E/libpersona: scanKnoxPersonas
    Couldn't open the File - /data/system/users/0/personalist.xml - No such file or directory
09-12 14:39:39.490 25666-25770/com.planme E/AndroidRuntime: FATAL EXCEPTION: Thread-13
    Process: com.planme, PID: 9509
    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/transistorsoft/locationmanager/adapter/TSConfig;
        at com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocationModule.<init>(RNBackgroundGeolocationModule.java:84)
        at com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocation.createNativeModules(RNBackgroundGeolocation.java:19)
        at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:106)
        at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1172)
        at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1142)
        at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1080)
        at com.facebook.react.ReactInstanceManager.access$900(ReactInstanceManager.java:113)
        at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:911)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.transistorsoft.locationmanager.adapter.TSConfig" on path: DexPathList[[zip file "/data/app/com.planme-Y0dpMuMIylF2V5IgrichJg==/base.apk"],nativeLibraryDirectories=[/data/app/com.planme-Y0dpMuMIylF2V5IgrichJg==/lib/arm, /data/app/com.planme-Y0dpMuMIylF2V5IgrichJg==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocationModule.<init>(RNBackgroundGeolocationModule.java:84) 
        at com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocation.createNativeModules(RNBackgroundGeolocation.java:19) 
        at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:106) 
        at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1172) 
        at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1142) 
        at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1080) 
        at com.facebook.react.ReactInstanceManager.access$900(ReactInstanceManager.java:113) 
        at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:911) 
        at java.lang.Thread.run(Thread.java:764) 

Here is my android/build.gradle

apply plugin: 'com.android.application'

import com.android.build.OutputFile

apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"

def enableSeparateBuildPerCPUArchitecture = false

def enableProguardInReleaseBuilds = false

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'

configurations {
  all {
    exclude module: 'httpclient'
    exclude module: 'json'
    exclude group: 'org.apache.httpcomponents'
  }
}

lintOptions {
  checkReleaseBuilds true
  // Or, if you prefer, you can continue to check for errors in release builds,
  // but continue the build even when errors are found:
  abortOnError true
}

defaultConfig {
    applicationId "com.planme"
    minSdkVersion 19
    targetSdkVersion 27

    versionCode 249
    versionName "3.1.4.0"
    // Enabling multidex support.
    multiDexEnabled true

  dexOptions {
      preDexLibraries false
      javaMaxHeapSize "4g"
    }

    ndk {
        abiFilters "armeabi-v7a", "x86"
    }
}
splits {
    abi {
        reset()
        enable enableSeparateBuildPerCPUArchitecture
        universalApk false  // If true, also generate a universal APK
        include "armeabi-v7a", "x86"
    }
}
signingConfigs {
  release {
    storeFile file(MYAPP_RELEASE_STORE_FILE)
    storePassword MYAPP_RELEASE_STORE_PASSWORD
    keyAlias MYAPP_RELEASE_KEY_ALIAS
    keyPassword MYAPP_RELEASE_KEY_PASSWORD
  }
}
buildTypes {

  release {
        minifyEnabled enableProguardInReleaseBuilds
        proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        signingConfig signingConfigs.release
  }
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
    variant.outputs.each { output ->
        // For each separate APK per architecture, set a unique version code as described here:
        // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
        def versionCodes = ["armeabi-v7a":1, "x86":2]
        def abi = output.getFilter(OutputFile.ABI)
        if (abi != null) {  // null for the universal-debug, universal-release variants
            output.versionCodeOverride =
                    versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
        }
    }
}

packagingOptions {
  exclude 'META-INF/LICENSE'
  exclude 'META-INF/NOTICE'
}
}

allprojects {
  repositories {
    google()
    maven { url "$rootDir/../node_modules/react-native/android" }
    jcenter()
  }
}

dependencies {

  configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
      def requested = details.requested
      if (requested.group == 'com.android.support' && requested.name != 'multidex' && requested.name != 'multidex-instrumentation') {
        details.useVersion '27.1.1'
      }
    }
  }

  implementation project(path: ':react-native-image-rotate', configuration: 'default')
  implementation project(path: ':bugsnag-react-native', configuration: 'default')
  implementation project(path: ':react-native-view-shot', configuration: 'default')
  implementation project(path: ':react-native-vector-icons', configuration: 'default')
  implementation project(path: ':react-native-device-info', configuration: 'default')
  api (project(path: ':react-native-code-push', configuration: 'default')) {
    compile 'com.nimbusds:nimbus-jose-jwt:5.1'
  }
  api (project(path: ':react-native-spinkit', configuration: 'default')) {
    compile 'com.github.ybq:Android-SpinKit:1.1.0'
  }
  implementation project(path: ':react-native-sound', configuration: 'default')
  implementation project(path: ':react-native-sms-android', configuration: 'default')
  implementation project(path: ':react-native-sketch-view', configuration: 'default')
  implementation project(path: ':react-native-signature-capture', configuration: 'default')
  implementation project(path: ':react-native-share', configuration: 'default')
  implementation (project(path: ':react-native-photo-view', configuration: 'default')) {
    compile 'com.facebook.fresco:fresco:0.11.0'
    compile 'me.relex:photodraweeview:1.0.0'
  }
  api (project(path: ':react-native-mixpanel', configuration: 'default')) {
    compile "com.mixpanel.android:mixpanel-android:5.1.4"
  }

  implementation project(path: ':react-native-mail', configuration: 'default')
  implementation project(path: ':react-native-locale', configuration: 'default')
  implementation project(path: ':react-native-linear-gradient', configuration: 'default')
  implementation project(path: ':react-native-image-to-base64', configuration: 'default')
  implementation project(path: ':react-native-image-resizer', configuration: 'default')
  implementation project(path: ':react-native-fs', configuration: 'default')
  implementation project(path: ':react-native-fetch-blob', configuration: 'default')

    implementation project(path: ':react-native-background-geolocation', configuration: 'default')
    implementation project(path: ':react-native-background-fetch', configuration: 'default')

    implementation project(path: ':react-native-svg', configuration: 'default')
  implementation project(path: ':react-native-contacts', configuration: 'default')
  api (project(path: ':react-native-pdf', configuration: 'default')) {
    implementation 'com.github.barteksc:android-pdf-viewer:3.0.0-beta.5'
  }
  api (project(path: ':react-native-firebase', configuration: 'default')) {
    implementation 'me.leolin:ShortcutBadger:1.1.21@aar'
  }

  api (project(path: ':react-native-camera', configuration: 'default')) {
    exclude group: "com.google.android.gms"
    implementation "com.google.zxing:core:3.2.1"
    implementation "com.drewnoakes:metadata-extractor:2.9.1"

    compile 'com.android.support:exifinterface:27.+'
    compile ('com.google.android.gms:play-services-vision:15.0.2') {
      force = true
    }
  }

  api 'com.google.firebase:firebase-core:15.0.2'
  api "com.google.firebase:firebase-firestore:16.0.0"
  api "com.google.firebase:firebase-storage:15.0.2"
  api "com.google.firebase:firebase-auth:15.1.0"
  //api "com.google.firebase:firebase-analytics:15.0.2"
  api "com.google.firebase:firebase-messaging:15.0.2"
  api "com.google.android.gms:play-services-base:15.0.1"
  api "com.google.firebase:firebase-database:15.0.1"

    implementation 'com.bugsnag:bugsnag-android:4.3.1'

  implementation 'com.facebook.android:facebook-android-sdk:4.29.0'
  implementation fileTree(include: ['*.jar'], dir: 'libs')
  implementation 'com.android.support:appcompat-v7:27.1.1'
  implementation 'com.android.support:recyclerview-v7:27.1.1'
  implementation 'com.facebook.react:react-native:+'
  implementation project(':realm')

  // From node_modules
  implementation 'com.android.support:multidex:1.0.3'
  implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
    transitive = true
  }
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
  from configurations.compile
  into 'libs'
}

apply plugin: 'com.google.gms.google-services'
christocracy commented 6 years ago

You built this for RELEASE, I assume?

christocracy commented 6 years ago

Show me your android/build.gradle

NOTE: engage syntax highlighting by wrapping logs/code with 3-backticks. See the github markdown docs linked at the bottom of the textarea.

tomershohet commented 6 years ago

Hi, i tried to DEBUG only not release. Here is my android/build.gradle

DELETED

christocracy commented 6 years ago

That is NOT your android/build.gradle -- that is your android/app/build.gradle, which you already included in your initial issue.

Again, show me me your android/build.gradle.

tomershohet commented 6 years ago

Here is my android/build.gradle.

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

buildscript {
  repositories {
    jcenter()
    google()
    maven {
      url "https://jitpack.io"
    }
    maven { url 'https://maven.fabric.io/public' }
  }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'
        classpath 'com.google.gms:google-services:3.2.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

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"
        }
        google()
        maven { url 'https://maven.fabric.io/public' }
        maven { url "https://jitpack.io" }
        maven { url "$rootDir/../node_modules/react-native-background-geolocation/android/libs" }
        maven { url "$rootDir/../node_modules/react-native-background-fetch/android/libs" }
    }
}
christocracy commented 6 years ago

See the Setup Docs where you're warned to implement the "Gradle Configuration Properties".

Freshly create RN apps (ie: $ react-native init Foo) now automatically add this block.

christocracy commented 6 years ago

Closed for lack of feedback.

tomershohet commented 6 years ago

Hi, Tried to do many of the suggestion, followed your instruction step by step, added the "Gradle configuration properties" but none of them worked. Do you have any idea what could cause this error?

apply plugin: 'com.android.application'
import com.android.build.OutputFile

apply from: "../../node_modules/react-native/react.gradle"

def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false

android {
    compileSdkVersion rootProject.compileSdkVersion
    buildToolsVersion rootProject.buildToolsVersion

    configurations {
      all {
        exclude module: 'httpclient'
        exclude module: 'json'
        exclude group: 'org.apache.httpcomponents'
      }
    }

    lintOptions {
      checkReleaseBuilds true
      // Or, if you prefer, you can continue to check for errors in release builds,
      // but continue the build even when errors are found:
      abortOnError true
    }

    defaultConfig {
        applicationId "com.planme"
        minSdkVersion 19
        targetSdkVersion rootProject.targetSdkVersion

        versionCode 249
        versionName "3.1.4.0"
        // Enabling multidex support.
        multiDexEnabled true

      dexOptions {
          preDexLibraries false
          javaMaxHeapSize "4g"
        }

        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86"
        }
    }
    signingConfigs {
      release {
        storeFile file(MYAPP_RELEASE_STORE_FILE)
        storePassword MYAPP_RELEASE_STORE_PASSWORD
        keyAlias MYAPP_RELEASE_KEY_ALIAS
        keyPassword MYAPP_RELEASE_KEY_PASSWORD
      }
    }
    buildTypes {

      release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            signingConfig signingConfigs.release
      }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }

    packagingOptions {
      exclude 'META-INF/LICENSE'
      exclude 'META-INF/NOTICE'
    }
}

allprojects {
  repositories {
    google()
    maven { url "$rootDir/../node_modules/react-native/android" }
    maven { url "$rootDir/../node_modules/react-native-background-geolocation/android/libs" }
    maven { url "$rootDir/../node_modules/react-native-background-fetch/android/libs" }

    jcenter()
  }
}

dependencies {

  configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
      def requested = details.requested
      if (requested.group == 'com.android.support' && requested.name != 'multidex' && requested.name != 'multidex-instrumentation') {
        details.useVersion '27.1.1'
      }
      if (requested.group == 'com.google.android.gms' && requested.name == 'play-services-basement') {
          details.useVersion '15.0.1'
      }

        if (requested.group == 'com.google.firebase' && requested.name == 'firebase-iid') {
            details.useVersion '15.1.0'
        }

    }
  }

    implementation "com.google.android.gms:play-services-basement:15.0.1"

    implementation 'com.google.firebase:firebase-core:15.0.2'
    implementation "com.google.firebase:firebase-firestore:16.0.0"
    implementation "com.google.firebase:firebase-storage:15.0.2"
    implementation "com.google.firebase:firebase-auth:15.1.0"
    //api "com.google.firebase:firebase-analytics:15.0.2"
    implementation "com.google.firebase:firebase-messaging:15.0.2"
    implementation "com.google.android.gms:play-services-base:15.0.1"
    implementation "com.google.firebase:firebase-database:15.0.1"

    implementation project(path: ':react-native-image-rotate', configuration: 'default')
    implementation project(path: ':bugsnag-react-native', configuration: 'default')
    implementation project(path: ':react-native-view-shot', configuration: 'default')
    implementation project(path: ':react-native-vector-icons', configuration: 'default')
    implementation project(path: ':react-native-device-info', configuration: 'default')

    api (project(path: ':react-native-spinkit', configuration: 'default')) {
      compile 'com.github.ybq:Android-SpinKit:1.1.0'
    }
    implementation project(path: ':react-native-sound', configuration: 'default')
    implementation project(path: ':react-native-sms-android', configuration: 'default')
    implementation project(path: ':react-native-sketch-view', configuration: 'default')
    implementation project(path: ':react-native-signature-capture', configuration: 'default')
    implementation project(path: ':react-native-share', configuration: 'default')
    implementation (project(path: ':react-native-photo-view', configuration: 'default')) {
      compile 'com.facebook.fresco:fresco:0.11.0'
      compile 'me.relex:photodraweeview:1.0.0'
    }
    api (project(path: ':react-native-mixpanel', configuration: 'default')) {
      compile "com.mixpanel.android:mixpanel-android:5.1.4"
    }

    implementation project(path: ':react-native-mail', configuration: 'default')
    implementation project(path: ':react-native-locale', configuration: 'default')
    implementation project(path: ':react-native-linear-gradient', configuration: 'default')
    implementation project(path: ':react-native-image-to-base64', configuration: 'default')
    implementation project(path: ':react-native-image-resizer', configuration: 'default')
    implementation project(path: ':react-native-fs', configuration: 'default')
    implementation project(path: ':react-native-fetch-blob', configuration: 'default')

    implementation project(path: ':react-native-background-geolocation', configuration: 'default')
    implementation project(path: ':react-native-background-fetch', configuration: 'default')

    implementation project(path: ':react-native-svg', configuration: 'default')
    implementation project(path: ':react-native-contacts', configuration: 'default')
    api (project(path: ':react-native-pdf', configuration: 'default')) {
    implementation 'com.github.barteksc:android-pdf-viewer:3.0.0-beta.5'
    }
    api (project(path: ':react-native-firebase', configuration: 'default')) {
      implementation 'me.leolin:ShortcutBadger:1.1.21@aar'
    }

  api (project(path: ':react-native-camera', configuration: 'default')) {
    exclude group: "com.google.android.gms"
    implementation "com.google.zxing:core:3.2.1"
    implementation "com.drewnoakes:metadata-extractor:2.9.1"

    compile 'com.android.support:exifinterface:27.+'
    compile ('com.google.android.gms:play-services-vision:16.2.0') {
      force = true
    }
  }

    implementation 'com.bugsnag:bugsnag-android:4.3.1'

  implementation 'com.facebook.android:facebook-android-sdk:4.29.0'
  implementation fileTree(include: ['*.jar'], dir: 'libs')
  implementation 'com.android.support:appcompat-v7:27.1.1'
  implementation 'com.android.support:recyclerview-v7:27.1.1'
  implementation 'com.facebook.react:react-native:+'
  implementation project(':realm')

  // From node_modules
  implementation 'com.android.support:multidex:1.0.3'
  implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
    transitive = true
  }
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
  from configurations.compile
  into 'libs'
}

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

The android gradle is:


    buildscript {
      repositories {
        jcenter()
        google()
        maven {
          url "https://jitpack.io"
        }
        maven { url 'https://maven.fabric.io/public' }
      }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.1.3'
            classpath 'com.google.gms:google-services:4.1.0'
        }
    }

    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"
            }
            google()
            maven { url 'https://maven.fabric.io/public' }
            maven { url "https://jitpack.io" }
                   maven {
                           url 'https://maven.google.com'
                       }
            maven { url "$rootDir/../node_modules/react-native-background-geolocation/android/libs" }
            maven { url "$rootDir/../node_modules/react-native-background-fetch/android/libs" }
        }
    }

    ext {
        compileSdkVersion   = 28
        targetSdkVersion    = 28
        buildToolsVersion   = "28.0.3"
        supportLibVersion   = "28.0.0"
        playServicesVersion = "15.0.1"
    }

The error is:

Lcom/transistorsoft/locationmanager/adapter/callback/TSLocationCallback;
        at java.util.List com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocation.createNativeModules(com.facebook.react.bridge.ReactApplicationContext) (RNBackgroundGeolocation.java:19)
        at void com.facebook.react.NativeModuleRegistryBuilder.processPackage(com.facebook.react.ReactPackage) (NativeModuleRegistryBuilder.java:106)
        at void com.facebook.react.ReactInstanceManager.processPackage(com.facebook.react.ReactPackage, com.facebook.react.NativeModuleRegistryBuilder) (ReactInstanceManager.java:1172)
        at com.facebook.react.bridge.NativeModuleRegistry com.facebook.react.ReactInstanceManager.processPackages(com.facebook.react.bridge.ReactApplicationContext, java.util.List, boolean) (ReactInstanceManager.java:1142)
        at com.facebook.react.bridge.ReactApplicationContext com.facebook.react.ReactInstanceManager.createReactContext(com.facebook.react.bridge.JavaScriptExecutor, com.facebook.react.bridge.JSBundleLoader) (ReactInstanceManager.java:1080)
        at com.facebook.react.bridge.ReactApplicationContext com.facebook.react.ReactInstanceManager.access$900(com.facebook.react.ReactInstanceManager, com.facebook.react.bridge.JavaScriptExecutor, com.facebook.react.bridge.JSBundleLoader) (ReactInstanceManager.java:113)
        at void com.facebook.react.ReactInstanceManager$5.run() (ReactInstanceManager.java:911)
        at void java.lang.Thread.run() (Thread.java:764)
    Caused by: java.lang.ClassNotFoundException: Didn't find class "com.transistorsoft.locationmanager.adapter.callback.TSLocationCallback" on path: DexPathList[[zip file "/data/app/com.planme-OZtpMpyjTPDu_C0WxmVcrA==/base.apk"],nativeLibraryDirectories=[/data/app/com.planme-OZtpMpyjTPDu_C0WxmVcrA==/lib/arm, /data/app/com.planme-OZtpMpyjTPDu_C0WxmVcrA==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
        at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:93)
        at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
        at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
        at java.util.List com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocation.createNativeModules(com.facebook.react.bridge.ReactApplicationContext) (RNBackgroundGeolocation.java:19)
        at void com.facebook.react.NativeModuleRegistryBuilder.processPackage(com.facebook.react.ReactPackage) (NativeModuleRegistryBuilder.java:106)
        at void com.facebook.react.ReactInstanceManager.processPackage(com.facebook.react.ReactPackage, com.facebook.react.NativeModuleRegistryBuilder) (ReactInstanceManager.java:1172)
        at com.facebook.react.bridge.NativeModuleRegistry com.facebook.react.ReactInstanceManager.processPackages(com.facebook.react.bridge.ReactApplicationContext, java.util.List, boolean) (ReactInstanceManager.java:1142)
        at com.facebook.react.bridge.ReactApplicationContext com.facebook.react.ReactInstanceManager.createReactContext(com.facebook.react.bridge.JavaScriptExecutor, com.facebook.react.bridge.JSBundleLoader) (ReactInstanceManager.java:1080)
        at com.facebook.react.bridge.ReactApplicationContext com.facebook.react.ReactInstanceManager.access$900(com.facebook.react.ReactInstanceManager, com.facebook.react.bridge.JavaScriptExecutor, com.facebook.react.bridge.JSBundleLoader) (ReactInstanceManager.java:113)
        at void com.facebook.react.ReactInstanceManager$5.run() (ReactInstanceManager.java:911)
        at void java.lang.Thread.run() (Thread.java:764)
    Rejecting re-init on previously-failed class java.lang.Class<com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocationModule$13>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/transistorsoft/locationmanager/adapter/callback/TSLocationCallback;
        at java.util.List com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocation.createNativeModules(com.facebook.react.bridge.ReactApplicationContext) (RNBackgroundGeolocation.java:19)
        at void com.facebook.react.NativeModuleRegistryBuilder.processPackage(com.facebook.react.ReactPackage) (NativeModuleRegistryBuilder.java:106)
        at void com.facebook.react.ReactInstanceManager.processPackage(com.facebook.react.ReactPackage, com.facebook.react.NativeModuleRegistryBuilder) (ReactInstanceManager.java:1172)
        at com.facebook.react.bridge.NativeModuleRegistry com.facebook.react.ReactInstanceManager.processPackages(com.facebook.react.bridge.ReactApplicationContext, java.util.List, boolean) (ReactInstanceManager.java:1142)
        at com.facebook.react.bridge.ReactApplicationContext com.facebook.react.ReactInstanceManager.createReactContext(com.facebook.react.bridge.JavaScriptExecutor, com.facebook.react.bridge.JSBundleLoader) (ReactInstanceManager.java:1080)
        at com.facebook.react.bridge.ReactApplicationContext com.facebook.react.ReactInstanceManager.access$900(com.facebook.react.ReactInstanceManager, com.facebook.react.bridge.JavaScriptExecutor, com.facebook.react.bridge.JSBundleLoader) (ReactInstanceManager.java:113)
        at void com.facebook.react.ReactInstanceManager$5.run() (ReactInstanceManager.java:911)
        at void java.lang.Thread.run() (Thread.java:764)
    Caused by: java.lang.ClassNotFoundException: Didn't find class "com.transistorsoft.locationmanager.adapter.callback.TSLocationCallback" on path: DexPathList[[zip file "/data/app/com.planme-OZtpMpyjTPDu_C0WxmVcrA==/base.apk"],nativeLibraryDirectories=[/data/app/com.planme-OZtpMpyjTPDu_C0WxmVcrA==/lib/arm, /data/app/com.planme-OZtpMpyjTPDu_C0WxmVcrA==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
        at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:93)
        at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
        at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
        at java.util.List com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocation.createNativeModules(com.facebook.react.bridge.ReactApplicationContext) (RNBackgroundGeolocation.java:19)
        at void com.facebook.react.NativeModuleRegistryBuilder.processPackage(com.facebook.react.ReactPackage) (NativeModuleRegistryBuilder.java:106)
        at void com.facebook.react.ReactInstanceManager.processPackage(com.facebook.react.ReactPackage, com.facebook.react.NativeModuleRegistryBuilder) (ReactInstanceManager.java:1172)
        at com.facebook.react.bridge.NativeModuleRegistry com.facebook.react.ReactInstanceManager.processPackages(com.facebook.react.bridge.ReactApplicationContext, java.util.List, boolean) (ReactInstanceManager.java:1142)
        at com.facebook.react.bridge.ReactApplicationContext com.facebook.react.ReactInstanceManager.createReactContext(com.facebook.react.bridge.JavaScriptExecutor, com.facebook.react.bridge.JSBundleLoader) (ReactInstanceManager.java:1080)
        at com.facebook.react.bridge.ReactApplicationContext com.facebook.react.ReactInstanceManager.access$900(com.facebook.react.ReactInstanceManager, com.facebook.react.bridge.JavaScriptExecutor, com.facebook.react.bridge.JSBundleLoader) (ReactInstanceManager.java:113)
        at void com.facebook.react.ReactInstanceManager$5.run() (ReactInstanceManager.java:911)
        at void java.lang.Thread.run() (Thread.java:764)
11-11 18:33:59.999 13642-14533/com.planme E/AndroidRuntime: FATAL EXCEPTION: Thread-13
    Process: com.planme, PID: 13642
    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/transistorsoft/locationmanager/adapter/TSConfig;
        at com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocationModule.<init>(RNBackgroundGeolocationModule.java:84)
        at com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocation.createNativeModules(RNBackgroundGeolocation.java:19)
        at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:106)
        at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1172)
        at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1142)
        at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1080)
        at com.facebook.react.ReactInstanceManager.access$900(ReactInstanceManager.java:113)
        at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:911)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.transistorsoft.locationmanager.adapter.TSConfig" on path: DexPathList[[zip file "/data/app/com.planme-OZtpMpyjTPDu_C0WxmVcrA==/base.apk"],nativeLibraryDirectories=[/data/app/com.planme-OZtpMpyjTPDu_C0WxmVcrA==/lib/arm, /data/app/com.planme-OZtpMpyjTPDu_C0WxmVcrA==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocationModule.<init>(RNBackgroundGeolocationModule.java:84) 
        at com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocation.createNativeModules(RNBackgroundGeolocation.java:19) 
        at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:106) 
        at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1172) 
        at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1142) 
        at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1080) 
        at com.facebook.react.ReactInstanceManager.access$900(ReactInstanceManager.java:113) 
        at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:911) 
        at java.lang.Thread.run(Thread.java:764) 

Thank you