NoClassDefFoundError: Lcom/facebook/widget/ShareDialog$Mode;(1)
SDK ver: 7.17
Unity ver: 2018.4.1f1
Platform: Android 9
Happens on FB.Init () call
Has anyone encountered this issue?
Hey @alchemyincarnate , this issue is the same as https://github.com/facebook/facebook-sdk-for-unity/issues/294. Can you try adding -keep class com.facebook.internal.* {;} and -keep class com.facebook. {*;} in your proguard file?
will take a look and update this ticket as soon as I can, thank you.
Hello,
This is how the relevant section of mainTemplate.gradle looks like
buildTypes {
debug {
minifyEnabled **MINIFY_DEBUG**
useProguard **PROGUARD_DEBUG**
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-user.txt'**USER_PROGUARD**
jniDebuggable true
}
I added these two lines to proguard-user.txt
-keep class com.facebook.internal.* {*;}
-keep class com.facebook.* {*;}
Both files are in Assets/Plugins/Android folder
I am still getting the same error
I have solved the issue by downgrading to 7.16.1 and updating my PlayServicesResolver from the one bundled with Facebook.
Thank you
Most helpful comment
I have solved the issue by downgrading to 7.16.1 and updating my PlayServicesResolver from the one bundled with Facebook.
Thank you