Comments (9)
Hi!
Use 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
from metrica-push-plugin-unity.
Thanks. The error has changed to:
java.lang.Throwable:
java.lang.IllegalArgumentException: Given String is empty or null
com.google.android.gms.common.internal.Preconditions.checkNotEmpty(Unknown Source)
com.google.firebase.auth.api.internal.zzej.<init>(com.google.firebase:firebase-auth@@19.0.0:2)
com.google.firebase.auth.FirebaseAuth.<init>(com.google.firebase:firebase-auth@@19.0.0:7)
com.google.firebase.auth.internal.zzl.<init>(com.google.firebase:firebase-auth@@19.0.0:1)
com.google.firebase.auth.zzt.create(com.google.firebase:firebase-auth@@19.0.0:3)
com.google.firebase.components.ComponentRuntime.lambda$new$0(com.google.firebase:firebase-common@@19.1.0:70)
com.google.firebase.components.ComponentRuntime$$Lambda$1.get(com.google.firebase:firebase-common@@19.1.0)
com.google.firebase.components.Lazy.get(com.google.firebase:firebase-common@@19.1.0:55)
com.google.firebase.components.ComponentRuntime.initializeEagerComponents(com.google.firebase:firebase-common@@19.1.0:159)
com.google.firebase.FirebaseApp.initializeAllApis(com.google.firebase:firebase-common@@19.1.0:559)
com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.1.0:302)
com.yandex.metrica.push.impl.ai.a(SourceFile:32)
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 <db2abaff69d948c58a7f49ca6d55a928>:0)
AppMetricaPush.Start () (at <db2abaff69d948c58a7f49ca6d55a928>: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()
from metrica-push-plugin-unity.
Add in AndroidManifest:
<meta-data android:name="ymp_firebase_api_key" android:value="API_KEY"/>
API_KEY — App key in Firebase. You can find it in the current_key field of the google-services.json file. You can download the file in the Firebase console.
from metrica-push-plugin-unity.
@NesterovichAlexey I've just checked it, the value is already there, but the error still appears.
from metrica-push-plugin-unity.
mata-data named ymp_firebase_api_key
only works with AppMetrica Push SDK Android version 1.4.0.
But the Push Unity plugin uses version 1.1.0.
To upgrade to unity SDK version to 1.5.1 (now the latest) is a bit difficult.
I can help with that. What is the version of Unity and is there a file Assets/Plugins/Android/mainTemplate.Gradle
?
from metrica-push-plugin-unity.
- We use Unity 2019.3.0b9
- There's file
mainTemplate.Gradle.DISABLED
, and it's marked as "generated by unity"
from metrica-push-plugin-unity.
Cool! With this version, everything will be easier.
The file ends with DISABLED
, so you used it before, but now you don't.
You will need to start using it again, you can remove DISABLED
or select Custom Gradle Template
in Unity.
And add to the dependencies block:
implementation ("com.yandex. android: mobmetricapushlib:1.5.1") {
exclude group: "com.yandex. android", module: "mobmetricalib"
}
implementation " com.google.firebase:firebase-messaging:18.0.0"
implementation " com.google.android.gms: play-services-base:16.1.0"
implementation " com.android.support:support-v4:28.0.0"
When creating this file from scratch and adding these lines I succeeded:
mainTemplate.txt
Need to still from folders Assets/AppMetricaPush/Plugins/Android
to remove all except appmetrica-push-plugin.aar
from metrica-push-plugin-unity.
Moving whole project to manual gradle support seems to be a serious move that requires a lot of hassle. At least, it stopped build after the switch and I'm not sure that it's a good idea to keep digging this way.
Do you have any idea when the Unity plugin will start supporting the new version?
from metrica-push-plugin-unity.
UPD: I've managed to build the app with custom gradle template, but now I receive this error message:
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.app.NotificationChannel"
from metrica-push-plugin-unity.
Related Issues (7)
- Duplicate permissions in example manifest? HOT 1
- 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. HOT 2
- Google Play | 505 error | INSTALL_FAILED_DUPLICATE_PERMISSION HOT 1
- java.lang.RuntimeException at android.os.AsyncTask$3.done HOT 3
- com.google.android.gms.gcm.GcmReceiver: java.lang.ClassNotFoundException HOT 6
- No session recorded + Error in initializing about Android Support library
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metrica-push-plugin-unity.