Crash on startup
Devspm opened this issue · comments
I get the following error when i try to add the sdk,
08-20 17:21:27.206 6157-6157/? E/libprocessgroup: failed to make and chown /acct/uid_10093: Read-only file system 08-20 17:21:27.227 6157-6165/? E/art: Failed writing handshake bytes (-1 of 14): Broken pipe 08-20 17:21:30.127 6157-6157/com.byzero.smartlocation E/AndroidRuntime: FATAL EXCEPTION: main Process: com.byzero.smartlocation, PID: 6157 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf; at com.google.android.gms.location.LocationServices.<clinit>(Unknown Source) at io.radar.sdk.di.LocationModule.geofencingClient(LocationModule.kt:20) at io.radar.sdk.di.LocationModule_GeofencingClientFactory.proxyGeofencingClient(LocationModule_GeofencingClientFactory.java:32) at io.radar.sdk.di.LocationModule_GeofencingClientFactory.provideInstance(LocationModule_GeofencingClientFactory.java:23) at io.radar.sdk.di.LocationModule_GeofencingClientFactory.get(LocationModule_GeofencingClientFactory.java:19) at io.radar.sdk.di.LocationModule_GeofencingClientFactory.get(LocationModule_GeofencingClientFactory.java:10) at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) at io.radar.sdk.location.LocationManager_Factory.provideInstance(LocationManager_Factory.java:55) at io.radar.sdk.location.LocationManager_Factory.get(LocationManager_Factory.java:37) at io.radar.sdk.location.LocationManager_Factory.get(LocationManager_Factory.java:11) at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) at io.radar.sdk.di.DaggerRadarComponent.injectRadar(DaggerRadarComponent.java:135) at io.radar.sdk.di.DaggerRadarComponent.inject(DaggerRadarComponent.java:125) at io.radar.sdk.internal.RadarInitProvider.onCreate(RadarInitProvider.kt:24) at android.content.ContentProvider.attachInfo(ContentProvider.java:1696) at android.content.ContentProvider.attachInfo(ContentProvider.java:1671) at android.app.ActivityThread.installProvider(ActivityThread.java:4999) at android.app.ActivityThread.installContentProviders(ActivityThread.java:4594) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4534) at android.app.ActivityThread.access$1500(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.api.Api$zzf" on path: DexPathList[[zip file "/data/app/com.byzero.smartlocation-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at com.google.android.gms.location.LocationServices.<clinit>(Unknown Source) at io.radar.sdk.di.LocationModule.geofencingClient(LocationModule.kt:20) at io.radar.sdk.di.LocationModule_GeofencingClientFactory.proxyGeofencingClient(LocationModule_GeofencingClientFactory.java:32) at io.radar.sdk.di.LocationModule_GeofencingClientFactory.provideInstance(LocationModule_GeofencingClientFactory.java:23) at io.radar.sdk.di.LocationModule_GeofencingClientFactory.get(LocationModule_GeofencingClientFactory.java:19) at io.radar.sdk.di.LocationModule_GeofencingClientFactory.get(LocationModule_GeofencingClientFactory.java:10) at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) at io.radar.sdk.location.LocationManager_Factory.provideInstance(LocationManager_Factory.java:55) at io.radar.sdk.location.LocationManager_Factory.get(LocationManager_Factory.java:37) at io.radar.sdk.location.LocationManager_Factory.get(LocationManager_Factory.java:11) at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) at io.radar.sdk.di.DaggerRadarComponent.injectRadar(DaggerRadarComponent.java:135) at io.radar.sdk.di.DaggerRadarComponent.inject(DaggerRadarComponent.java:125) at io.radar.sdk.internal.RadarInitProvider.onCreate(RadarInitProvider.kt:24) at android.content.ContentProvider.attachInfo(ContentProvider.java:1696) at android.content.ContentProvider.attachInfo(ContentProvider.java:1671) at android.app.ActivityThread.installProvider(ActivityThread.java:4999) at android.app.ActivityThread.installContentProviders(ActivityThread.java:4594) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4534) at android.app.ActivityThread.access$1500(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.common.api.Api$zzf at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 29 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available 08-20 17:22:00.272 6157-6183/com.byzero.smartlocation E/FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE
couldn't find what the problem is...!
Hi, are you manually including your own version of Google Play Services, or is this running on a phone without Google Play Services at all?
You can read more here: https://developers.google.com/android/guides/setup
Specifically the section "Ensure Devices Have the Google Play services APK"
Hi , can you look at the project and app gradle below.
Project gradle --
`buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
`
app gradle --
`apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.byzero.smartlocation"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'io.radar:sdk:2.0.+'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:support-v4:28.0.0-rc01'
implementation 'com.android.support:support-media-compat:28.0.0-rc01'
implementation 'com.android.support:animated-vector-drawable:28.0.0-rc01'
implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'`
These look good to me, is this running on a phone with out of date Google Play Services (or none at all?)
You can read more here: https://developers.google.com/android/guides/setup
Specifically the section "Ensure Devices Have the Google Play services APK"
Hi there, the error gone after i removed the firebase core sdk. I think the radar sdk conflicts with the latest firebase core sdk.
You are correct, firebase-core
will bring in newer versions of play-services
dependencies but not the location play services library. To fix this you can either depend on the new location dependency manually like so:
implementation "com.google.android.gms:play-services-location:15.0.1"
or force the resolution like so:
configurations.all {
resolutionStrategy {
force "com.google.android.gms:play-services-location:15.0.1"
}
}
I was facing this issue from long time and finally got the solution. Thanks a lot @russellcullen