Closed teratat-mayawizard closed 3 months ago
google login also crash my log tell me is error at Landroidx/activity/ComponentActivity because it can not find androidx.activity.ComponentActivity
FATAL EXCEPTION: main Process: com.MyCompany.MyGame, PID: 787 java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/activity/ComponentActivity; at io.github.coolishbee.auth.GoogleLoginActivity.onCreate(GoogleLoginActivity.kt:38) at android.app.Activity.performCreate(Activity.java:8757) at android.app.Activity.performCreate(Activity.java:8729) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1475) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4005) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4181) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:114) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:144) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:101) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2643) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:257) at android.os.Looper.loop(Looper.java:368) at android.app.ActivityThread.main(ActivityThread.java:8839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049) Caused by: java.lang.ClassNotFoundException: androidx.activity.ComponentActivity at io.github.coolishbee.auth.GoogleLoginActivity.onCreate(GoogleLoginActivity.kt:38) at android.app.Activity.performCreate(Activity.java:8757) at android.app.Activity.performCreate(Activity.java:8729) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1475) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4005) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4181) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:114) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:144) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:101) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2643) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:257) at android.os.Looper.loop(Looper.java:368) at android.app.ActivityThread.main(ActivityThread.java:8839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)
Did you set it up according to the guide?
Don't add the information below :
implementation 'com.facebook.android:facebook-login:16.2.0'
implementation 'com.google.android.gms:play-services-auth:21.0.0'
Please refer to the demo project settings.
Yes, i set it up according to the guide but i don't use settingsTemplate.gradle because dependencyResolutionManagement don't support on gradle 6.1.1 (which Unity 2020.3 use) so i add maven { url 'https://jitpack.io' } on to mainTemplate.gradle.
([rootProject] + (rootProject.subprojects as List)).each { project -> project.repositories { def unityProjectPath = $/file:///DIR_UNITYPROJECT/$.replace("\", "/") maven { url "https://maven.google.com" } maven { url "https://jitpack.io" } mavenLocal() mavenCentral() } }
Ok, i didn't add
implementation 'com.facebook.android:facebook-login:16.2.0' implementation 'com.google.android.gms:play-services-auth:21.0.0'
ok, i solve it by fork demo project and check out to commit before the 2022.3 unity update than copy all gradle file from it.
i click facebook login and app crash
steps to reproduce
my log tell me is error at Lcom/facebook/FacebookActivity because it can not find com.facebook.FacebookActivity
do i need to add implementation 'com.facebook.android:facebook-login:16.2.0' implementation 'com.google.android.gms:play-services-auth:21.0.0' to my mainTemplate.gradle