Comments (14)
Hello, it's not a bug. Please make sure you follow the step 2 from our doc.
https://developers.amplitude.com/docs/unity
from unity-plugin.
thanks for answer. i'd build success but have a error when i'm trying log an event. this is error in picture
from unity-plugin.
if you have video setup, please send me
from unity-plugin.
from unity-plugin.
@phamhuong8794 Can you try add
-keep class com.amplitude.unity.plugins.AmplitudePlugin { *; }
to your Proguard exceptions file?
from unity-plugin.
An error if i change this proguard: -keep class com.amplitude.unity.plugins.AmplitudePlugin { *; }
2020-06-25 09:41:37.651 27740-27740/? E/Zygote: isWhitelistProcess - Process is Whitelisted
2020-06-25 09:41:37.652 27740-27740/? E/libpersona: scanKnoxPersonas
2020-06-25 09:41:37.652 27740-27740/? E/libpersona: Couldn't open the File - /data/system/users/0/personalist.xml - No such file or directory
2020-06-25 09:41:38.246 27740-27740/com.android.application E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.application, PID: 27740
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/unity3d/player/UnityPlayer;
at com.unity3d.player.UnityPlayerActivity.onCreate(Unknown Source:7)
at android.app.Activity.performCreate(Activity.java:7183)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.unity3d.player.UnityPlayer" on path: DexPathList[[zip file "/data/app/com.android.application-QqsCvCzcpl4HUeWyktLyiw==/base.apk"],nativeLibraryDirectories=[/data/app/com.android.application-QqsCvCzcpl4HUeWyktLyiw==/lib/arm, /data/app/com.android.application-QqsCvCzcpl4HUeWyktLyiw==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.unity3d.player.UnityPlayerActivity.onCreate(Unknown Source:7)
at android.app.Activity.performCreate(Activity.java:7183)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
from unity-plugin.
This error seems strange. I'm not sure why your proguard is behaving this way.
The idea is not to obfuscate com.amplitude.unity.plugins.AmplitudePlugin
class and its methods.
Which is this -
-keep class com.amplitude.unity.plugins.AmplitudePlugin
I don't think that's the issue in our tutorial. Maybe you can create a clean project to test it out.
from unity-plugin.
i'm create 4 times new project, and result is same. have issue of unity version??? i'm working in unity 2017.4.31f1. I'm don't find every package name is com.amplitude.unity.plugins.AmplitudePlugin in package
from unity-plugin.
2017? That's too old. We're on 2019.3.11f.
Also that class is inside our android sdk.
from unity-plugin.
Do I need to import that sdk into the project?
from unity-plugin.
i trying up to unity 2018.4.23f1, it same (@@)
from unity-plugin.
If possible, please give me a video of how to add the library
from unity-plugin.
Thanks haoliu,
I have finished adding amplitude to my project. There are some issues that hopefully help someone in need:
- i'm update version unity to 2018
- user lastest resolve jar
- replace -keep class com.amplitude.unity.plugins.AmplitudePlugin { *; } instead -keep class com.amplitude.unity.plugins.AmplitudePlugin
- This is how to add proguard file into unity: https://stackoverflow.com/questions/43774062/crashlytics-unity-plugin-export-to-android-studio/46840109#46840109
Goodluck!!
from unity-plugin.
@phamhuong8794 Glad you figured it out! Thanks for sharing the steps too!
from unity-plugin.
Related Issues (20)
- What's the best practice to satisfy Chinese privacy regulation? HOT 4
- ios undefine analyticsconnector class from amplitude HOT 12
- How to set user groups with SDK HOT 3
- UPM Package without ExternalDependencyManager HOT 16
- Android jar files being placed in package manager plugins folder when resolved HOT 8
- External dependency manager conflict HOT 1
- Assembly Definition files are missing HOT 9
- Could not resolve com.amplitude:android-sdk:2.38.3 HOT 2
- Unity iOS xcode 'Amplitude\Amplitude.h' file not found HOT 5
- Error build with admob
- Unity Package Manager Bug
- Kids app doesn’t comply with the Families Policy Requirements in Google Play
- Test Issue ticket creation in AMP
- Method `setServerZone` is not fully implemented for iOS HOT 1
- Update iOS native library to support Apple Privacy Manifest HOT 1
- Does Amplitude realize that the point of the dependency manager is, that it handles dependencies? HOT 2
- Crash Analytics/Reporting? HOT 4
- Can't get past "Listen for Event" for Unity source setup HOT 9
- Invalid version in 2.3.0 release HOT 1
- Warning when using plugin HOT 1
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 unity-plugin.