Can anyone help me with this crash when trying to run an app from android studio. I've been trying to get leaderboards and ads working in my app with the ads interface and gaming plugins. Currently I'm getting this:
FATAL EXCEPTION: main
Process: com.JetSplat.JohnNightingale, PID: 2704
java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-support-annotations-23.0.0_aa7ee2d99964bd993000219d00bcf11d8274067a-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-internal_impl-23.0.0_9467cb7e14cfb462c2b4b7dde329a07b289c978f-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-internal_impl-23.0.0_87df0418bcc49851758287b6767000c3f18a65d0-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-gideros_319c0004405d7e2a34a0cce00fe5de4111183936-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-com.google.firebase-firebase-storage-common-9.2.0_d8c0be3722b5ccb0ab6ff15de8e3e8558e8f2ba2-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-com.google.firebase-firebase-storage-9.2.0_2f988e52efc0c0aed0473e3b73111ba619f95ab8-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-com.google.firebase-firebase-messaging-9.2.0_9d3296c8c9008104f01c50590e202f0df90eff8c-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-com.google.firebase-firebase-iid-9.2.0_e4dcf17e36024ffdab444a34f8ad9975ba779b23-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-com.google.firebase-firebase-database-connection-9.2.0_903f7fb662a3c0712e5a0ceb39b0e53994d74d78-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-com.google.firebase-firebase-database-9.2.0_de007e51890b9f20b0731c9bfff7136c0a38b6fd-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-com.google.firebase-firebase-crash-9.2.0_fa84c7c5120ba39c7b766d95d20f1db2ab876729-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-com.google.firebase-firebase-config-9.2.0_96a12e09843789042fdbe835d9ec129187676c77-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-com.google.firebase-firebase-common-9.2.0_28b03c9ac8648fde5f0c53cd2b3ce3720e93efa5-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-com.google.firebase-firebase-auth-module-9.2.0_74fa3d5ac55fd7ef9c455879fc4126683b4beae4-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-com.google.firebase-firebase-auth-common-9.2.0_1a3e958a12770f5e28b9900099a924a372febd08-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-com.google.firebase-firebase-auth-9.2.0_e5ffe83273412802c54bbccd8269432faac7556d-classes.dex", dex file "/data/data/com.JetSplat.JohnNightingale/files/instant-run/dex/slice-com.google.firebase-firebase-analytics-impl-9.2.0_46d
I've tried my best to setup the gaming plugin.
Firstly a lot of people seem to say you import the project and not open an existing one. I tried importing but it just gave a ton of errors. When I open instead it seems to work but only after making you update the Gradle thingy.
Next up was the sdk version, which I now have at 23 and the dependencies bit I have as compile 'com.google.android.gms:play-services:9.2.0' and in the sdk manager I have Marshmallow installed (API 23). This seems to have stopped a whole bunch of errors so I assume this is good.
I have the leaderboards and everything setup on the google developer site and authenticated the app using SHA1 which I found in the signingReport bit in the Gradle projects window.
I just discovered something about a google-services.json which I've downloaded and copied into the app folder (although it doesn't show in android studio). My guess is this is related to the crash.
The activity.java file has System.loadLibrary("gaming"); and and in externalClasses "com.giderosmobile.android.plugins.gaming.Game".
I copied the ids.xml into the res/values folder and pasted the apps id into it.
And of course copied the com folder into the src folder from the gaming plugin.
I'm willing to bet there are a bunch more steps I've missed but I can't cope with this insanity anymore so thought I would plead for help
Comments
Hopefully we can get a solution
http://stackoverflow.com/a/37065238
sourceSets {
main {
jni.srcDirs = []
jniLibs.srcDir 'src/main/jniLibs'
}
}
It ran on emulator for the first time! yay!
So my " build.gradle (Module:app)" file now looks like:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "22.0.0"
defaultConfig {
applicationId "com.JetSplat.JohnNightingale"
minSdkVersion 9
targetSdkVersion 23
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
sourceSets {
main {
jni.srcDirs = []
jniLibs.srcDir 'src/main/jniLibs'
}
}
}
dependencies {
compile files('libs/gideros.jar')
compile files('libs/applovin-sdk-6.0.0.jar')
compile files('libs/vungle-publisher-adaptive-id-3.3.5.jar')
compile files('libs/javax.inject-1.jar')
compile files('libs/dagger-2.1.jar')
}
I did however remove all the gaming plugin stuff so will test that next. Also don't know if ads will play yet, will have to try on a real device and get google play integrated somehow Thanks for the help will keep you posted.
Likes: pie
I think I will have to give up on leaderboards and hope the ads work until there is an update to the plugin.
Likes: simwhi, SinisterSoft, antix, Ninjadoodle
Likes: antix
https://deluxepixel.com
You must install each framework you want to use based on their instalation instructions (usually by adding .jar file to project and modifying AndroidManifest file)
Does this mean I should do the install for the googleplay plugin too? As in adding the GGooglePlay.java and the exta bits to the manifest? I'm guessing not as the gaming plugin has it's own GameGoogleplay.java file, which leaves me wondering what it means?
@antix I will do write up of what I did, although I'm not 100% sure
dependencies {
compile files('libs/gideros.jar')
compile 'com.google.android.gms:play-services:7.8.0'
compile files('libs/applovin-sdk-6.0.0.jar')
compile files('libs/dagger-2.1.jar')
compile files('libs/javax.inject-1.jar')
compile files('libs/vungle-publisher-adaptive-id-3.3.5.jar')
}
So using an old google play lib: 'com.google.android.gms:play-services:7.8.0'
Actually I'll just show the whole thing
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.0.0"
defaultConfig {
applicationId "com.JetSplat.JohnNightingale"
minSdkVersion 9
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
sourceSets {
main {
jni.srcDirs = []
jniLibs.srcDir 'src/main/jniLibs'
}
}
}
dependencies {
compile files('libs/gideros.jar')
compile 'com.google.android.gms:play-services:7.8.0'
compile files('libs/applovin-sdk-6.0.0.jar')
compile files('libs/dagger-2.1.jar')
compile files('libs/javax.inject-1.jar')
compile files('libs/vungle-publisher-adaptive-id-3.3.5.jar')
}
So sdk version 21 and minSdkVersion 9
note the weird
sourceSets {
main {
jni.srcDirs = []
jniLibs.srcDir 'src/main/jniLibs'
}
}
this fixed a problem with it not finding .so files in my jnLibs dir
Ah crap and that was supposed to be the build.gradle (Module: app) file not the activity file, sorry this is a mess but hopefully someone will get what I mean
They are tucked away in /Applications/Gideros Studio/All Plugins/gaming/bin/Android/libs
Copy each version of the libgaming.so to your projects jnLibs/armeabi, jnLibs/armeabi-v7a and jnLibs/x86
/Applications/Gideros Studio/All Plugins/gaming/bin/Android/res/values
to
/app/src/main/res/values
or wherever your res/values folder is for your project
and replace the id number with the one from your google app id
Add this just above
I think one of those APP_ID things is redundant as it was borked before I added the 2nd one but I'm leaving cos it works:)
So how the hell do you use it? I tried
Anyone know how to use the gaming plugin and can post an example project please?
However I forgot to add the stuff in the main activity. I forget this a bit because whenever I export, it gets overwritten
But it works!!
It logged in and failed because there are other internal things I haven't done yet. I think I just need to use the correct app id and package name to connect fully.
Thanks to all who have assisted, you are amazing!
I guess you will need to define some meta-data in AndroidManifest file.
Likes: antix
Likes: antix
https://deluxepixel.com
Likes: simwhi, Ninjadoodle, talis, hgy29
Likes: antix, simwhi, talis, SinisterSoft