33

I got many crashes from my app which include GCM(Google Notification) feature. The crash detail as below:

java.lang.SecurityException: Unknown calling package name'com.mypackagename'.-android.os.Parcel.readException(1465) android.os.Parcel.readException(1419) com.google.android.gms.common.internal.zzs$zza$zza.zza(-1) com.google.android.gms.common.internal.zzs$zza$zza.zza(-1) com.google.android.gms.common.internal.zzj.zza(-1) com.google.android.gms.common.internal.zzj$zzf.zza(-1) com.google.android.gms.common.internal.zzj$zzh.zzqL(-1) com.google.android.gms.common.internal.zzj$zza.zzc(-1) com.google.android.gms.common.internal.zzj$zza.zzw(-1) com.google.android.gms.common.internal.zzj$zzc.zzqN(-1) com.google.android.gms.common.internal.zzj$zzb.handleMessage(-1) android.os.Handler.dispatchMessage(110) android.os.Looper.loop(193) android.app.ActivityThread.main(5292) java.lang.reflect.Method.invokeNative(-2) java.lang.reflect.Method.invoke(515) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(828) com.android.internal.os.ZygoteInit.main(644) dalvik.system.NativeStart.main(-2)

The same issue:https://code.google.com/p/android/issues/detail?id=230497

11
  • Check your package name, the error is on ur name of package check and correct Commented Jan 17, 2017 at 6:59
  • 1
    @W4R10CK Thanks, the crash information come from production environments the package name is correct in online app. com.mypackagename is replace one. Commented Jan 17, 2017 at 7:04
  • Check this SO question if it can help you. Commented Jan 17, 2017 at 13:48
  • @KENdi Thanks for your comments , My issue is that I got many crash from online app, but all the many crash from my app just a part of android device. Commented Jan 19, 2017 at 2:46
  • 1
    @TimNuwin , Hi Tim, me too. I have contacted with Google player support which need I give a crash report or screen shot as proof. because I got the issue from my self implements UncaughtExceptionHandler. Commented Jan 22, 2017 at 1:44

4 Answers 4

7

Faced the same problem when added Firebase dependencies to my project.

java.lang.SecurityException: Unknown calling package name 'com.google.android.gms'

Solve this by updating installed SDKs: Tool -> SDK Manager -> (in my case) Android API 35 ->

Android SDK Platform 35 and Google Play Intel x86_64 Atom System Image <- updating one of this SDK was solve this exception.

UPD1: Ok, solution above help me fix this error with Firebase Authentication, but when I started working directly with Firestore database it appear again.

UPD2: Found solution here for Firestore db gms error:

  1. check installed packages with adb command ( adb shell dumpsys package com.google.android.gms | grep versionName ) if found two versions ->

  2. go to emulator/device settings and reset Google Play Services.

Sign up to request clarification or add additional context in comments.

Comments

5

Try these steps:

  1. Check Permissions:

Ensure that you have INTERNET permission, add this line to androidManifes.xml

<uses-permission android:name="android.permission.INTERNET" />
  1. Update Google Play Services:

Ensure that the Google Play Services library in your app is up-to-date. You can do this by updating the dependencies in your build.gradle file.

implementation 'com.google.android.gms:play-services:17.0.0'

you can check play-servies latest version here

3 Comments

Where'd you see version 17.0.0? I'm looking at maven.google.com/web/… and only see 12.0.1 :)
@opyate updated the answer.
no such implementation as 'com.google.android.gms:play-services'. And how is "com.google.firebase:firebase-bom:33.12.0" relevant here? I already have that and Im getting this error.
1

As of August 2025, @munsif even if you get the correct version you will get class dublicate error when compiling.

This is the tried and proven fix:

Do not use this lib:

implementation 'com.google.android.gms:play-services:17.0.0'

This is the correct lib:

implementation("com.google.android.gms:play-services-maps:17.0.0")

Why you ask? This will not cause dublicate errors.

By this type check the latest version.

Comments

-7

The solution:

feedback the issue to google player support and than the issue will disppear.

or

update the SDK of com.google.android.gms:play-services-gcm to latest version

5 Comments

Where does one file Google Play Services bugs at?
What do you mean by "feedback the issue"?What were the steps you took to fix the issue?
@kos just feedback the issue to google play support team
@kos you can try to update the sdk to latest version too. com.google.android.gms:play-services-gcm:latestversion-number
I dont use this package and I still get the same error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.