The App Stop when start

Solved!
Posted in General by Daniel Ortiz Thu Jan 12 2017 15:48:10 GMT+0000 (UTC)·7·Viewed 445 times

Hello , my name is Daniel Ortiz from Colombia ,Im working with procibernetica and we integrate and deploy for first time the app with moca api , The app capture the beacons data but show this error: java.lang.IllegalAccessError: tried to access method android.support.v4.content.ContextCompat.<init>:(Ljava/lang/String;)V from class com.google.android.gms.iid.zzd We make all steps in guide for SDK android What we doing wrong?
Ivan Gonzalez
Jan 12, 2017

Hi Daniel,

Could you please copy / paste the full stack trace ?
Are you calling a MOCA method when this occurs or just when you initialize the MOCA SDK.

Best,

Daniel Ortiz
Jan 12, 2017

Yes , when initialize MOCA SDK

The Stack:
1-12 11:10:38.653 19831-19881/com.procibernetica.moca I/dalvikvm: DexOpt: illegal method access (call Landroid/support/v4/content/ContextCompat;.<init> ()V from Lcom/google/android/gms/iid/zzd;)
01-12 11:10:38.653 19831-19881/com.procibernetica.moca I/dalvikvm: Could not find method android.support.v4.content.ContextCompat.<init>, referenced from method com.google.android.gms.iid.zzd.zzdL
01-12 11:10:38.653 19831-19881/com.procibernetica.moca W/dalvikvm: VFY: unable to resolve direct method 4004: Landroid/support/v4/content/ContextCompat;.<init> ()V
01-12 11:10:38.653 19831-19881/com.procibernetica.moca D/dalvikvm: VFY: replacing opcode 0x70 at 0x0002
01-12 11:10:38.663 19831-19881/com.procibernetica.moca W/dalvikvm: threadid=21: thread exiting with uncaught exception (group=0x4304b160)
01-12 11:10:38.663 19831-19879/com.procibernetica.moca V/MOCA: processEventsAsync
01-12 11:10:38.663 19831-19879/com.procibernetica.moca I/MOCA: upload started
01-12 11:10:38.663 19831-19881/com.procibernetica.moca E/AndroidRuntime: FATAL EXCEPTION: IntentService[PushService]
Process: com.procibernetica.moca, PID: 19831
java.lang.IllegalAccessError: tried to access method android.support.v4.content.ContextCompat.<init>:(Ljava/lang/String;)V from class com.google.android.gms.iid.zzd
at com.google.android.gms.iid.zzd.zzdL(Unknown Source)
at com.google.android.gms.iid.zzd.<init>(Unknown Source)
at com.google.android.gms.iid.zzd.<init>(Unknown Source)
at com.google.android.gms.iid.InstanceID.zza(Unknown Source)
at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source)
at com.innoquant.moca.push.PushManager.refreshToken(PushManager.java:178)
at com.innoquant.moca.push.PushService.handleIntent(PushService.java:76)
at com.innoquant.moca.push.PushService.onHandleIntent(PushService.java:49)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:149)
at android.os.HandlerThread.run(HandlerThread.java:61)

Ivan Gonzalez
Jan 12, 2017

Hey Daniel,

The most likely cause is that the appcompat dependency on your app does is different from the one expected by MOCA SDK.

Please check your application dependencies, and ensure that your appcompat and support-v4 libraries versions are, at least, 23.3.0. Bear in mind that the version of these libraries must match with the compileSdkVersion of your app (at least 23).

Ivan Gonzalez
Jan 12, 2017

`typo' ... the appcompat dependency on your app is different from the one expected by MOCA SDK. *

Daniel Ortiz
Jan 12, 2017

Thanks Ivan , I fix this updating and appcomp google services

compile 'com.google.android.gms:play-services-gcm:9.2.0'
compile 'com.google.android.gms:play-services-location:9.2.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:support-v4:25.1.0'

Thanks So much!!

Ivan Gonzalez
Jan 12, 2017

🎉


Ivan Gonzalez marked this as solved
Markdown is allowed