the app I am currently making is as follows.
The app includes Firebase auth and firestore, and the version is all 12.0.2.
There is a function within the app to link with other robots, and it works using Bluetooth.
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime FATAL EXCEPTION: main
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/protobuf/GeneratedMessageV3;
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at com.xxx.mini.lib.bt.controller.BtManager.createBleSession(BtManager.kt:69)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at com.xxx.mini.btcontroller.functions.MiniControlApi.connectRobot(MiniControlApi.kt:120)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at com.ooo.alphaminiplugin.UnityPlugin.connectDevice(UnityPlugin.java:118)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at com.ooo.alphaminiplugin.UnityPlugin.onConnectDevice(UnityPlugin.java:104)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at com.unity3d.player.ReflectionHelper.nativeProxyInvoke(Native Method)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at com.unity3d.player.ReflectionHelper.-$$Nest$smnativeProxyInvoke(Unknown Source:0)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at com.unity3d.player.ReflectionHelper$a.invoke(Unknown Source:29)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at $Proxy2.run(Unknown Source)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at android.os.Handler.handleCallback(Handler.java:883)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at android.os.Handler.dispatchMessage(Handler.java:100)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at android.os.Looper.loop(Looper.java:237)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at android.app.ActivityThread.main(ActivityThread.java:8167)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at java.lang.reflect.Method.invoke(Native Method)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime Caused by: java.lang.ClassNotFoundException: com.google.protobuf.GeneratedMessageV3
2024/09/21 23:42:54.698 14883 14883 Error AndroidRuntime … 16 more
The result I found after Googling is to add the following code to plugin/android/mainTemplate.gradle in the Unity editor.
implementation ‘com.google.protobuf:protobuf-javalite:3.19.4’
Also, in proguard-user.txt
-keep class com.google.protobuf.** { *; }
is to add .
After doing this, I built it again, and as a result of linking with the robot within the app via Bluetooth, the same error as above keeps repeating.
My guess is that after upgrading firebase, the existing API seems to be causing a conflict, but the API cannot be modified separately.
Several posts say that firebase and com.google.protobuf are conflicting, but I can’t find it.
Could you possibly solve it together?
이준호 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.