line/line-sdk-unity

Error on Android:Failed resolution of: Lcom/google/gson/Gson;

senjouhara opened this issue · 1 comments

Is it a security issue?

No

What did you do?

Unity 2018.4.7f1

1 Import line_sdk_unity_1.1.4.unitypackage to a empty unity project.
2 Switch platform to Andorid.
3 open "Main" scene and replace Channel ID on LineSDK object.
4 Build apk with mini api level21.
5 Run apk in sumsung SM-G9600

What did you expect?

The build Run with no error

What happened actually?

2020-09-07 11:29:50.762 5604-5624/? E/Unity: AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/gson/Gson;
    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/gson/Gson;
        at com.linecorp.linesdk.unitywrapper.LineSdkWrapper.<init>(LineSdkWrapper.kt:21)
        at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
        at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
        at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source:72)
        at android.os.MessageQueue.next(MessageQueue.java:395)
        at android.os.Looper.loop(Looper.java:181)
        at com.unity3d.player.UnityPlayer$e.run(Unknown Source:32)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.gson.Gson" on path: DexPathList[[zip file "/data/app/com.chm.linetest-letwctzDNm2HWtnsrXKO3A==/base.apk"],nativeLibraryDirectories=[/data/app/com.chm.linetest-letwctzDNm2HWtnsrXKO3A==/lib/arm, /data/app/com.chm.linetest-letwctzDNm2HWtnsrXKO3A==/base.apk!/lib/armeabi-v7a, /system/lib]]
    	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClas

Your environment?

Build from 2018.4.7f1
LineSDK 1.1.4

Sample project

https://drive.google.com/file/d/1wvDOGwkAolomlllUePsXElTznq4VCu3O/view?usp=sharing

I have same issue :(
It worked fine for the 2019.3 project. However, after updating the project to unity 2020.1.10f1, a problem occurred.