7

I am having this issue since last some days i have tried lot. I have found many solution but none of it works.

I have also tried to reinstall Android Studio and SDK. I have updated SDK too.

Still same error. Here is the Error Which I got when App Crash.

ATAL EXCEPTION: IntentService[GCMRegistrationService]
 Process: sample.tinfo.main, PID: 14194
 java.lang.NoSuchMethodError: No virtual method getNoBackupFilesDir(Landroid/content/Context;)Ljava/io/File; in class Landroid/support/v4/content/ContextCompat; or its super classes (declaration of 'android.support.v4.content.ContextCompat' appears in /data/app/sample.tinfo.main-1/base.apk)
     at com.google.android.gms.iid.zzd.zzeb(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.pushwoosh.GCMRegistrationService.register(Unknown Source)
     at com.pushwoosh.GCMRegistrationService.onHandleIntent(Unknown Source)
     at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
     at android.os.Handler.dispatchMessage(Handler.java:102)
     at android.os.Looper.loop(Looper.java:145)
     at android.os.HandlerThread.run(HandlerThread.java:61)

I am using Mac OS with latest Android studio 1.5.0.

Here is the some screenshots of My Gradle File.

enter image description here

Here is the some screenshots of My project.properties

enter image description here

Here is the some screenshots of My SDK

enter image description here enter image description here

Please Help me. Thanks in Advance.

Mayur
  • 503
  • 1
  • 6
  • 17

2 Answers2

1

There must be some issue with your SDK, remove your current SDK fully and Reinstall it and Update your node-js and phoneGap version.

Rahul Patel
  • 1,822
  • 12
  • 21
0

Finally After long research i found the solution.

Issue was due to Facebook Plugin. As its using old jar files to it was creating problems. Here is the steps I follow. Hope fully it help someone else.

  1. Update All the Sdk.
  2. Add Push Plugin. And Remove existing Facebook plugin (if you have)
  3. Now install This Facebook Plugin.(cordova-plugin-facebook4)
  4. now run command ( ionic build android)

Then its working fine :)

Note: After adding facebook plugin don't go in android studio just run the ionic build android and then try to run project from android studio.

Mayur
  • 503
  • 1
  • 6
  • 17