adjust / unity_sdk

This is the Unity SDK of
http://www.adjust.com
MIT License
155 stars 71 forks source link

java.lang.ClassNotFoundException: com.adjust.sdk.Adjust #296

Closed YevheniiMl closed 6 months ago

YevheniiMl commented 6 months ago

sdk 4.38.1 unity 2022.3.30f1

With development builds all is fine, sdk fully functional. But with release builds gets exception: The type initializer for 'com.adjust.sdk.AdjustAndroid' threw an exception. that contains inner exception: java.lang.ClassNotFoundException: com.adjust.sdk.Adjust

YevheniiMl commented 6 months ago

Found the problem.. May be will helpful for someone in future. After uploading build to Google Play Store I got warning There is no deobfuscation file associated with this App Bundle. If you use obfuscated code (R8/proguard), uploading a deobfuscation file will make crashes and ANRs easier to analyze and debug. Using R8/proguard can help reduce app size. On forums I found that this may be fixed by enable Project Settings => Player => Android => Publishing Settings => Minify and I did it only for release build) By the way Minify has help hint - Enable to minify your java code. NOTE: Minification can sometimes remove needed code and produce non-working binaries