yandexmobile / metrica-push-plugin-unity Goto Github PK
View Code? Open in Web Editor NEWUnity plugin for Yandex AppMetrica Push SDK
Unity plugin for Yandex AppMetrica Push SDK
com.google.android.finsky.installer.ak.onReceive(22): Error -505 while installing com.tnttv.borodach2: INSTALL_FAILED_DUPLICATE_PERMISSION: Package com.tnttv.borodach2 attempting to redeclare permission com.yandex.mobile.metrica.push.sample.unity.permission.C2D_MESSAGE already owned by com.tnttv.borodach
in example maniest
<uses-permission android:name="com.yandex.mobile.metrica.push.sample.unity.permission.C2D_MESSAGE"/>
<permission android:name="com.yandex.mobile.metrica.push.sample.unity.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
can build pak but can not install
Failure [INSTALL_FAILED_DUPLICATE_PERMISSION perm=com.yandex.mobile.metrica.push.sample.unity.permission.C2D_MESSAGE pkg=com.test.demo]
Exception occured on some devices:
java.lang.RuntimeException:
at android.os.AsyncTask$3.done (AsyncTask.java:353)
at java.util.concurrent.FutureTask.finishCompletion (FutureTask.java:383)
at java.util.concurrent.FutureTask.setException (FutureTask.java:252)
at java.util.concurrent.FutureTask.run (FutureTask.java:271)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
at java.lang.Thread.run (Thread.java:764)
Caused by: com.yandex.metrica.impl.ob.vs:
at com.yandex.metrica.impl.ob.vr.a (SourceFile:30)
at com.yandex.metrica.impl.ob.pp.a (SourceFile:33)
at com.yandex.metrica.impl.ob.pu.a (SourceFile:204)
at com.yandex.metrica.impl.ob.ci.a (SourceFile:96)
at com.yandex.metrica.p.rce (SourceFile:118)
at com.yandex.metrica.push.impl.z.a (SourceFile:3021)
at com.yandex.metrica.push.impl.z.a (SourceFile:18)
at com.yandex.metrica.push.impl.ad.a (SourceFile:21)
at com.yandex.metrica.push.impl.b.a (SourceFile:92)
at com.yandex.metrica.push.PushService$a.a (SourceFile:55)
at com.yandex.metrica.push.PushService$d.a (SourceFile:44)
at com.yandex.metrica.push.CommandIntentService.onHandleWork (SourceFile:38)
at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground (JobIntentService.java:391)
at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground (JobIntentService.java:382)
at android.os.AsyncTask$2.call (AsyncTask.java:333)
at java.util.concurrent.FutureTask.run (FutureTask.java:266)
Android 9 20 530 55,0 %
Android 8.0 9 454 25,3 %
Android 8.1 7 329 19,6 %
What can be the cause of this problem?
Plugin was set up properly and works fine in the most cases.
Hi App Metrica Team,
I experience this exception with installed push SDK on an android device (Xiaomi Redmi Note 7).
AndroidJavaException: java.lang.IllegalArgumentException: Please set your project ID. A valid Firebase project ID is required to communicate with Firebase server APIs: It identifies your project with Google. java.lang.IllegalArgumentException: Please set your project ID. A valid Firebase project ID is required to communicate with Firebase server APIs: It identifies your project with Google. com.google.android.gms.common.internal.Preconditions.checkNotEmpty(Unknown Source:8) com.google.firebase.iid.FirebaseInstanceId.zza(com.google.firebase:firebase-iid@@20.1.7:52) com.google.firebase.iid.FirebaseInstanceId.getInstance(com.google.firebase:firebase-iid@@20.1.7:2) com.yandex.metrica.push.impl.ag.a(SourceFile:49) com.yandex.metrica.push.impl.b.a(SourceFile:83) com.yandex.metrica.push.YandexMetricaPush.init(SourceFile:139) com.unity3d.player.UnityPlayer.nativeRender(Native Method) com.unity3d.player.UnityPlayer.access$300(Unknown Source:0) com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95) android.os.Handler.dispatchMessage(Handler.java:103) android.os.Looper.loop(Looper.java:224) com.unity3d.player.UnityPlayer$e.run(Unknown Source:20) UnityEngine.AndroidJNISafe.CheckException () (at /Users/bokken/buildslave/unity/build/Modules/AndroidJNI/AndroidJNISafe.cs:24) UnityEngine.AndroidJNISafe.CallStaticVoidMethod (System.IntPtr clazz, System.IntPtr methodID, UnityEngine.jvalue[] args) (at /Users/bokken/buildslave/unity/build/Modules/AndroidJNI/AndroidJNISafe.cs:217) UnityEngine.AndroidJavaObject._CallStatic (System.String methodName, System.Object[] args) (at /Users/bokken/buildslave/unity/build/Modules/AndroidJNI/AndroidJava.cs:591) UnityEngine.AndroidJavaObject.CallStatic (System.String methodName, System.Object[] args) (at /Users/bokken/buildslave/unity/build/Modules/AndroidJNI/AndroidJava.cs:252) YandexMetricaPushAndroid.Initialize () (at E:/UnityProjects/UnityTestProjects_7/NewEraTestProject_2/Assets/AppMetricaPush/YandexAppMetricaPushAndroid.cs:36) AppMetricaPush.Start () (at E:/UnityProjects/UnityTestProjects_7/NewEraTestProject_2/Assets/AppMetricaPush/AppMetricaPush.cs:49)
--
Following are the steps I have followed:
Note: My project contains Firebase App, Cloud, Storage, Authentication, Cloud Messaging, Real-Time database, and External dependency manager packages.
1- I followed the official tutorial and integrate App Metrica and App Metrica SDK into the project.
2- When I build the app for the android platform, I got duplicate classes issue. Upon examing, I find out that the App Metrica push plugin has some .aar files which are also present in firebase SDK. So I delete all the files in the App Metrica push plugin except "appmetrica-push-plugin" & "mobmetricapushlib-1.1.0" and then build the app.
3- Though the app was build but when I try to test on android, I got the "java.lang.IllegalStateException: FirebaseApp name [DEFAULT] already exists!". So as mentioned in this link: "#8", I change the "ymp_firebase_app_id" instead of "ymp_firebase_default_app_id" and "ymp_gcm_sender_id" instead of "ymp_gcm_default_sender_id" in AndroidManifest.xml.
4- After doing this step, I am now getting this error "java.lang.IllegalArgumentException: Please set your project ID. A valid Firebase project ID is required to communicate with Firebase server APIs: It identifies your project with Google.".
I have tried my best to check every android manifest file to see if anywhere project or app id is wrong but all are correct. I have checked in "google-services" file which is under plugins/android/firebase/res/values but app id are correct there too.
So after that I test the app metrica push sdk without having any firebase related files in project and it works.
Thus the issue I understand is that app metrica push sdk has conflicts with firebase app sdk.
Can you please guide me, what can be the possible solutions?
Thanks in Advance
При получении пуша возникает ошибка:
java.lang.RuntimeException: Unable to instantiate receiver com.google.android.gms.gcm.GcmReceiver: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.gcm.GcmReceiver" on path: DexPathList
Hi,
We experience this exception with installed Push SDK:
java.lang.Throwable:
java.lang.IllegalStateException: FirebaseApp name [DEFAULT] already exists!
com.google.android.gms.common.internal.Preconditions.checkState(Unknown Source)
com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.1.0:293)
com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.1.0:266)
com.yandex.metrica.push.impl.al.a(SourceFile:30)
com.yandex.metrica.push.impl.ag.a(SourceFile:48)
com.yandex.metrica.push.impl.b.a(SourceFile:83)
com.yandex.metrica.push.YandexMetricaPush.init(SourceFile:139)
com.unity3d.player.UnityPlayer.nativeRender(Native Method)
com.unity3d.player.UnityPlayer.access$300(Unknown Source)
com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source)
android.os.Handler.dispatchMessage(Handler.java:98)
android.os.Looper.loop(Looper.java:163)
com.unity3d.player.UnityPlayer$e.run(Unknown Source)
UnityEngine.AndroidJNISafe.CheckException () (at <dcb3aea45c9345de8667cb9cbdf166d6>:0)
UnityEngine.AndroidJNISafe.CallStaticVoidMethod (System.IntPtr clazz, System.IntPtr methodID, UnityEngine.jvalue[] args) (at <dcb3aea45c9345de8667cb9cbdf166d6>:0)
UnityEngine.AndroidJavaObject._CallStatic (System.String methodName, System.Object[] args) (at <dcb3aea45c9345de8667cb9cbdf166d6>:0)
UnityEngine.AndroidJavaObject.CallStatic (System.String methodName, System.Object[] args) (at <dcb3aea45c9345de8667cb9cbdf166d6>:0)
YandexMetricaPushAndroid.Initialize () (at <12300fb6f16248a59995018ab85cdc84>:0)
AppMetricaPush.Start () (at <12300fb6f16248a59995018ab85cdc84>:0)
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.access$300()
at com.unity3d.player.UnityPlayer$e$1.handleMessage()
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:163)
at com.unity3d.player.UnityPlayer$e.run()
Any ideas how to fix it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.