Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

这库是多久没有维护了居然报这个错................. #53

Open
lxhtiamo opened this issue Jun 14, 2018 · 7 comments
Open

这库是多久没有维护了居然报这个错................. #53

lxhtiamo opened this issue Jun 14, 2018 · 7 comments

Comments

@lxhtiamo
Copy link

java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/app/ActionBarActivity;

@mars-ma
Copy link

mars-ma commented Jul 4, 2018

v7包不能更新到最新的版本,不能用了。。。

@json988
Copy link

json988 commented Sep 4, 2018

package android.support.v7.app;

/**

  • Created by blackadmin on 07/10/17.
    */

public class ActionBarActivity extends AppCompatActivity {
}

@loveanao
Copy link

loveanao commented Apr 25, 2019

需要修改 hermes 源码  xiaofei.library.hermes.util.TypeUtils 源码	
    修改完成后,使用 module 依赖,亲测可用正常使用

private static final HashSet<Class<?>> CONTEXT_CLASSES = new HashSet<Class<?>>() {
    {
        add(Context.class);
        add(ActionBarActivity.class);
        add(Activity.class);
        add(AppCompatActivity.class);
        add(Application.class);
        add(FragmentActivity.class);
        add(IntentService.class);
        add(Service.class);
    }
};

为

private static final HashSet<Class<?>> CONTEXT_CLASSES = new HashSet<Class<?>>() {
    {
        add(Context.class);
        add(Activity.class);
        add(AppCompatActivity.class);
        add(Application.class);
        add(FragmentActivity.class);
        add(IntentService.class);
        add(Service.class);
    }
};

@JcmeLs
Copy link

JcmeLs commented May 23, 2019

@loveanao 亲测可用

@mjsheng
Copy link

mjsheng commented Jul 23, 2019

需要修改 hermes 源码  xiaofei.library.hermes.util.TypeUtils 源码	
    修改完成后,使用 module 依赖,亲测可用正常使用

private static final HashSet<Class<?>> CONTEXT_CLASSES = new HashSet<Class<?>>() {
    {
        add(Context.class);
        add(ActionBarActivity.class);
        add(Activity.class);
        add(AppCompatActivity.class);
        add(Application.class);
        add(FragmentActivity.class);
        add(IntentService.class);
        add(Service.class);
    }
};

为

private static final HashSet<Class<?>> CONTEXT_CLASSES = new HashSet<Class<?>>() {
    {
        add(Context.class);
        add(Activity.class);
        add(AppCompatActivity.class);
        add(Application.class);
        add(FragmentActivity.class);
        add(IntentService.class);
        add(Service.class);
    }
};

我下了源码,但是找不到 xiaofei.library.hermes.util.TypeUtils 这个类,具体怎么操作呀!谢谢

@lotosbin
Copy link

@mjsheng 这个类是在 依赖的库 hermes 中的,不是这个仓储中,

@Aaron-the-coder
Copy link

需要修改 hermes 源码  xiaofei.library.hermes.util.TypeUtils 源码	
    修改完成后,使用 module 依赖,亲测可用正常使用

private static final HashSet<Class<?>> CONTEXT_CLASSES = new HashSet<Class<?>>() {
    {
        add(Context.class);
        add(ActionBarActivity.class);
        add(Activity.class);
        add(AppCompatActivity.class);
        add(Application.class);
        add(FragmentActivity.class);
        add(IntentService.class);
        add(Service.class);
    }
};

为

private static final HashSet<Class<?>> CONTEXT_CLASSES = new HashSet<Class<?>>() {
    {
        add(Context.class);
        add(Activity.class);
        add(AppCompatActivity.class);
        add(Application.class);
        add(FragmentActivity.class);
        add(IntentService.class);
        add(Service.class);
    }
};

改完还是报错
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/app/ActionBarActivity;
at xiaofei.library.hermes.util.TypeUtils$1.(TypeUtils.java:51)
at xiaofei.library.hermes.util.TypeUtils.(TypeUtils.java:48)
at xiaofei.library.hermes.util.TypeUtils.validateClass(TypeUtils.java:278)
at xiaofei.library.hermes.util.TypeCenter.register(TypeCenter.java:94)
at xiaofei.library.hermes.Hermes.register(Hermes.java:71)
at xiaofei.library.hermeseventbus.HermesEventBus.init(HermesEventBus.java:125)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants