com.google.android.gms.iid.InstanceID

729 views
Skip to first unread message

Gareth Murfin

unread,
Apr 5, 2016, 12:26:32 PM4/5/16
to CodenameOne Discussions
Im writing some native code to support appsflyer.com, Ive got a compile but when it runs I get this:


Caught Exception
E/AppsFlyer_4.3.2( 4748): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/iid/InstanceID;
E/AppsFlyer_4.3.2( 4748):       at com.appsflyer.AppsFlyerLib$2.run(AppsFlyerLib.java:186)
E/AppsFlyer_4.3.2( 4748):       at java.lang.Thread.run(Thread.java:818)
E/AppsFlyer_4.3.2( 4748): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.iid.InstanceID" on path: DexPathList[[zip file "/data/app/com.raffler-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
E/AppsFlyer_4.3.2( 4748):       at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
E/AppsFlyer_4.3.2( 4748):       at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
E/AppsFlyer_4.3.2( 4748):       at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
E/AppsFlyer_4.3.2( 4748):       ... 2 more
E/AppsFlyer_4.3.2( 4748):       Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.iid.InstanceID
E/AppsFlyer_4.3.2( 4748):               at java.lang.Class.classForName(Native Method)
E/AppsFlyer_4.3.2( 4748):               at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
E/AppsFlyer_4.3.2( 4748):               at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
E/AppsFlyer_4.3.2( 4748):               at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
E/AppsFlyer_4.3.2( 4748):               ... 3 more
E/AppsFlyer_4.3.2( 4748):       Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
W/System.err( 4748): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
W/System.err( 4748):    at android.os.Handler.<init>(Handler.java:200)
W/System.err( 4748):    at android.os.Handler.<init>(Handler.java:114)
W/System.err( 4748):    at com.appsflyer.Foreground.<init>(Foreground.java:59)
W/System.err( 4748):    at com.appsflyer.Foreground.init(Foreground.java:74)
W/System.err( 4748):    at com.appsflyer.AppsFlyerLib.registerForAppEvents(AppsFlyerLib.java:153)
W/System.err( 4748):    at com.appsflyer.AppsFlyerLib.startTracking(AppsFlyerLib.java:384)
W/System.err( 4748):    at userclasses.nativeinterfaces.AppsFlyerInterfaceImpl.startTracking(AppsFlyerInterfaceImpl.java:60)
W/System.err( 4748):    at userclasses.nativeinterfaces.AppsFlyerInterfaceStub.startTracking(AppsFlyerInterfaceStub.java:9)
W/System.err( 4748):    at com.raffler.MyApplication.doNative_FB_GOOGLE_APPSFLYER(MyApplication.java:203)
W/System.err( 4748):    at com.raffler.MyApplication.start(MyApplication.java:94)
W/System.err( 4748):    at com.raffler.MyApplicationStub.run(MyApplicationStub.java:156)
W/System.err( 4748):    at com.codename1.ui.Display.processSerialCalls(Display.java:1148)
W/System.err( 4748):    at com.codename1.ui.Display.mainEDTLoop(Display.java:965)
W/System.err( 4748):    at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
W/System.err( 4748):    at com.codename1.impl.CodenameOneThread$1.run(CodenameOneThread.java:60)
W/System.err( 4748):    at java.lang.Thread.run(Thread.java:818)

For some reason its not there, I tried also using the built hint android.playService.identity unsuccessfully, any ideas?

Gareth Murfin

unread,
Apr 5, 2016, 1:54:08 PM4/5/16
to CodenameOne Discussions
also I dont want to turn on all of gservices due to the memory thing of course. I just realised I probably need android.playService.gcm this is now true but am getting OOM for now will keep trying.

Gareth Murfin

unread,
Apr 5, 2016, 1:55:22 PM4/5/16
to CodenameOne Discussions
or maybe there should also be a build hint called android.playService.gcm

Gareth Murfin

unread,
Apr 5, 2016, 2:03:11 PM4/5/16
to CodenameOne Discussions
OK I found android.playService.indexing which should do it I think. but it is now failing OOM again.. probably because it is using slightly more classes of course. 

Shai Almog

unread,
Apr 5, 2016, 11:18:21 PM4/5/16
to CodenameOne Discussions
I refreshed the servers which should solve this.

Gareth Murfin

unread,
Apr 6, 2016, 7:01:18 AM4/6/16
to CodenameOne Discussions
thanks shai it builds now, but same error - is there any way for me to get com/google/android/gms/iid/InstanceID; ??
Reply all
Reply to author
Forward
0 new messages