anko
anko copied to clipboard
Runtime error
Hi,
my app is crashed in runtime from api 6.0.1 Samsung.
this is error
No pending exception expected: java.lang.NoClassDefFoundError: org.jetbrains.anko.sdk27.coroutines.Sdk27CoroutinesListenersWithCoroutinesKt$onCapturedPointer$1 at java.lang.Class dalvik.system.DexFile.defineClassNative(java.lang.String, java.lang.ClassLoader, java.lang.Object) (DexFile.java:-2)
Have the same issue on Android 6. Works on later versions.
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] No pending exception expected: java.lang.NoClassDefFoundError: org.jetbrains.anko.sdk27.coroutines.Sdk27CoroutinesListenersWithCoroutinesKt$onCapturedPointer$1
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at java.lang.Class dalvik.system.DexFile.defineClassNative(java.lang.String, java.lang.ClassLoader, java.lang.Object) (DexFile.java:-2)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at java.lang.Class dalvik.system.DexFile.defineClass(java.lang.String, java.lang.ClassLoader, java.lang.Object, java.util.List) (DexFile.java:226)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at java.lang.Class dalvik.system.DexFile.loadClassBinaryName(java.lang.String, java.lang.ClassLoader, java.util.List) (DexFile.java:219)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at java.lang.Class dalvik.system.DexPathList.findClass(java.lang.String, java.util.List) (DexPathList.java:338)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:54)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:511)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:469)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void org.jetbrains.anko.sdk27.coroutines.Sdk27CoroutinesListenersWithCoroutinesKt.onClick$default(android.view.View, kotlin.coroutines.CoroutineContext, kotlin.jvm.functions.Function3, int, java.lang.Object) (ListenersWithCoroutines.kt:-1)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void com.burlymarmot.etours.uicontrols.TourBar.<init>(android.content.Context, android.util.AttributeSet, int) (TourBar.kt:69)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void com.burlymarmot.etours.uicontrols.TourBar.<init>(android.content.Context, android.util.AttributeSet) (TourBar.kt:35)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at java.lang.Object java.lang.reflect.Constructor.newInstance!(java.lang.Object[]) (Constructor.java:-2)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:619)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:764)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:704)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:835)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:798)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:515)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:423)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:374)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:532)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:161)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void com.burlymarmot.etours.activities.MainActivity.processEnterStateEvents(com.burlymarmot.etours.EventStateChange) (MainActivity.kt:870)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void com.burlymarmot.etours.activities.MainActivity.access$processEnterStateEvents(com.burlymarmot.etours.activities.MainActivity, com.burlymarmot.etours.EventStateChange) (MainActivity.kt:67)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void com.burlymarmot.etours.activities.MainActivity$onEvent$1.invoke() (MainActivity.kt:835)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at java.lang.Object com.burlymarmot.etours.activities.MainActivity$onEvent$1.invoke() (MainActivity.kt:67)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void com.burlymarmot.etours.utils.ExtensionsKt.callWithExceptionHandling(android.app.Activity, java.lang.Boolean, java.lang.Boolean, java.lang.Boolean, kotlin.jvm.functions.Function0) (Extensions.kt:84)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void com.burlymarmot.etours.utils.ExtensionsKt.callWithExceptionHandling$default(android.app.Activity, java.lang.Boolean, java.lang.Boolean, java.lang.Boolean, kotlin.jvm.functions.Function0, int, java.lang.Object) (Extensions.kt:57)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void com.burlymarmot.etours.activities.MainActivity.onEvent(com.burlymarmot.etours.EventStateChange) (MainActivity.kt:831)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void org.greenrobot.eventbus.EventBus.invokeSubscriber(org.greenrobot.eventbus.Subscription, java.lang.Object) (EventBus.java:507)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void org.greenrobot.eventbus.EventBus.invokeSubscriber(org.greenrobot.eventbus.PendingPost) (EventBus.java:501)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void org.greenrobot.eventbus.HandlerPoster.handleMessage(android.os.Message) (HandlerPoster.java:67)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void android.os.Looper.loop() (Looper.java:148)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:5551)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:730)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336] at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:620)
07-10 14:20:22.274 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/thread.cc:1336]
07-10 14:20:23.008 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/barrier.cc:90] Check failed: count_ == 0 (count_=-1, 0=0) Attempted to destroy barrier with non zero count
07-10 14:20:23.008 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/runtime.cc:366] Runtime aborting --- recursively, so no thread-specific detail!
07-10 14:20:23.008 29410-29410/com.burlymarmot.etours.yerevan A/art: art/runtime/runtime.cc:366]
07-10 14:20:23.008 29410-29410/com.burlymarmot.etours.yerevan A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 29410 (.etours.yerevan)
2020-07-02 11:21:26.405 23305-23305/com.cmy.kotlintest E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.cmy.kotlintest, PID: 23305
java.lang.IllegalStateException: Module with the Main dispatcher had failed to initialize
at kotlinx.coroutines.internal.MissingMainCoroutineDispatcher.missing(MainDispatchers.kt:113)
at kotlinx.coroutines.internal.MissingMainCoroutineDispatcher.isDispatchNeeded(MainDispatchers.kt:91)
at kotlinx.coroutines.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:269)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:26)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:109)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:158)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:54)
at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
at org.jetbrains.anko.sdk27.coroutines.Sdk27CoroutinesListenersWithCoroutinesKt$onClick$1.onClick(ListenersWithCoroutines.kt:299)
at android.view.View.performClick(View.java:5647)
at android.view.View$PerformClick.run(View.java:22462)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6377)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
Caused by: java.lang.AbstractMethodError: abstract method "java.lang.String kotlinx.coroutines.internal.MainDispatcherFactory.hintOnError()"
at kotlinx.coroutines.internal.MainDispatchersKt.tryCreateDispatcher(MainDispatchers.kt:59)
at kotlinx.coroutines.internal.MainDispatcherLoader.loadMainDispatcher(MainDispatchers.kt:38)
at kotlinx.coroutines.internal.MainDispatcherLoader.
`package com.cmy.kotlintest
import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import kotlinx.android.synthetic.main.activity_main.* import org.jetbrains.anko.sdk27.coroutines.onClick import org.jetbrains.anko.toast
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
button.onClick {
toast("test")
}
}
}`