getActivity / EasyWindow

Android 悬浮窗框架,好用不解释
Apache License 2.0
1.46k stars 163 forks source link

[Bug]:Didn't find class "com.hjq.window.draggable.SpringDraggable" #51

Closed chen3441251 closed 11 months ago

chen3441251 commented 11 months ago

框架版本【必填】

10.6

问题描述【必填】

报错:Caused by: java.lang.ClassNotFoundException: Didn't find class "com.hjq.window.draggable.SpringDraggable" on path; 降级到10.3版本是ok的; 10.5开始库里面的 Lcom/hjq/window/draggable/SpringDraggable ;SpringDraggable类名改为了SpringBackDraggable,所以找不到这个类,报错

复现步骤【必填】

直接运行示例代码

是否必现【必填】

项目 targetSdkVersion【必填】

30

出现问题的手机信息【必填】

华为mate60pro

出现问题的安卓版本【必填】

Android12

问题信息的来源渠道【必填】

自己遇到的

是部分机型还是所有机型都会出现【必答】

必须

框架最新的版本是否存在这个问题【必答】

框架文档是否提及了该问题【必答】

是否已经查阅框架文档但还未能解决的【必答】

issue 列表中是否有人曾提过类似的问题【必答】

是否已经搜索过了 issue 列表但还未能解决的【必答】

是否可以通过 Demo 来复现该问题【必答】

未选择

提供报错堆栈

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/hjq/window/draggable/SpringDraggable;
        at com.hjq.logcat.LogcatWindow.<init>(LogcatWindow.java:33)
        at com.hjq.logcat.LogcatDispatcher.onActivityCreated(LogcatDispatcher.java:25)
        at android.app.Application.dispatchActivityCreated(Application.java:360)
        at android.app.Activity.dispatchActivityCreated(Activity.java:1407)
        at android.app.Activity.onCreate(Activity.java:1692)
        at androidx.core.app.ComponentActivity.onCreate(ComponentActivity.java:85)
        at androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:149)
        at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:313)
        at androidx.appcompat.app.AppCompatActivity.onCreate(AppCompatActivity.java:118)
        at com.lib.base.BaseActivity.onCreate(BaseActivity.java:38)
        at com.changjian.anyeerong.supportBase.SupportBaseActivity.onCreate(SupportBaseActivity.java:80)
        at android.app.Activity.performCreate(Activity.java:8592)
        at android.app.Activity.performCreate(Activity.java:8565)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1344)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4744)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4994)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:123)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:3070)
        at android.os.Handler.dispatchMessage(Handler.java:117)
        at android.os.Looper.loopOnce(Looper.java:205)
        at android.os.Looper.loop(Looper.java:293)
        at android.app.ActivityThread.loopProcess(ActivityThread.java:9961)
        at android.app.ActivityThread.main(ActivityThread.java:9950)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:586)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1240)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.hjq.window.draggable.SpringDraggable" on path: DexPathList[[zip file "/data/app/~~P8iW32qZu8oiNW-Pxj8LwQ==/com.changjian.anyeerong-0Vr7Ja2vNAqLa8e1J6oUFg==/base.apk"],nativeLibraryDirectories=[/data/app/~~P8iW32qZu8oiNW-Pxj8LwQ==/com.changjian.anyeerong-0Vr7Ja2vNAqLa8e1J6oUFg==/lib/arm64, /data/app/~~P8iW32qZu8oiNW-Pxj8LwQ==/com.changjian.anyeerong-0Vr7Ja2vNAqLa8e1J6oUFg==/base.apk!/lib/arm64-v8a, /system/lib64, /hw_product/lib64, /system/lib64/module/multimedia, /system/product/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:218)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.hjq.logcat.LogcatWindow.<init>(LogcatWindow.java:33) 
        at com.hjq.logcat.LogcatDispatcher.onActivityCreated(LogcatDispatcher.java:25) 
        at android.app.Application.dispatchActivityCreated(Application.java:360) 
        at android.app.Activity.dispatchActivityCreated(Activity.java:1407) 
        at android.app.Activity.onCreate(Activity.java:1692) 
        at androidx.core.app.ComponentActivity.onCreate(ComponentActivity.java:85) 
        at androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:149) 
        at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:313) 
        at androidx.appcompat.app.AppCompatActivity.onCreate(AppCompatActivity.java:118) 
        at com.lib.base.BaseActivity.onCreate(BaseActivity.java:38) 
        at xxx.SupportBaseActivity.onCreate(SupportBaseActivity.java:80) 
        at android.app.Activity.performCreate(Activity.java:8592) 
        at android.app.Activity.performCreate(Activity.java:8565) 
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1344) 
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4744) 
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4994) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:123) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:3070) 
        at android.os.Handler.dispatchMessage(Handler.java:117) 
        at android.os.Looper.loopOnce(Looper.java:205) 
        at android.os.Looper.loop(Looper.java:293) 
        at android.app.ActivityThread.loopProcess(ActivityThread.java:9961) 
        at android.app.ActivityThread.main(ActivityThread.java:9950) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:586) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1240) 

提供截图或视频

No response

提供解决方案

降级到10.3版本是ok的; 10.5开始库里面的 Lcom/hjq/window/draggable/SpringDraggable ;SpringDraggable类名改为了SpringBackDraggable,所以找不到这个类,报错

getActivity commented 11 months ago

小伙子,该 issue 被打回,打回的原因如下: