FacebookComponents icon indicating copy to clipboard operation
FacebookComponents copied to clipboard

java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics

Open johnn82 opened this issue 4 years ago • 0 comments

Version Number of Plugin: 4.0.1 Device Tested On: Xperia XZ2 Android 10 Simulator Tested On: Pixel 2 Android 11 (Google Play) Version of VS: 2019 Version of Xamarin: 16.11

Steps to reproduce the Behavior

NOTE: the error occours only when launching the app not compiling it!

DevOps virtual agent used: windows-2019 https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md

Building Xamarin.Forms app using Microsoft Azure DevOps pipeline create an APK that CRASH with this error.

Time	Device Name	Type	PID	Tag	Message
11-15 16:47:16.785	pixel_2_r_11_0_-_api_30	Info	5937	MonoDroid	java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics;
	at com.facebook.internal.FacebookInitProvider.<clinit>(FacebookInitProvider.kt:14)
	at java.lang.Class.newInstance(Native Method)
	at android.app.AppComponentFactory.instantiateProvider(AppComponentFactory.java:147)
	at androidx.core.app.CoreComponentFactory.instantiateProvider(CoreComponentFactory.java:67)
	at android.app.ActivityThread.installProvider(ActivityThread.java:7228)
	at android.app.ActivityThread.installContentProviders(ActivityThread.java:6780)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6697)
	at android.app.ActivityThread.access$1300(ActivityThread.java:237)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7656)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Expected Behavior

App should run normally without crashing

Actual Behavior

App crash when launching the one compiled using an Azure DevOps build pipeline. App runs fine when compiled, either in Debug or in Release, using Visual Studio 2019.

The error seems to be related to this: https://github.com/xamarin/XamarinComponents/issues/603.

NOTE: Adding reference to https://www.nuget.org/packages/Xamarin.Kotlin.StdLib/1.5.31.2 solved the problem!

johnn82 avatar Nov 15 '21 22:11 johnn82