Skip to content
This repository has been archived by the owner on Aug 26, 2019. It is now read-only.

同#69 dex分包后NullPointerException #70

Open
ShenHaiyi opened this issue Dec 28, 2018 · 0 comments
Open

同#69 dex分包后NullPointerException #70

ShenHaiyi opened this issue Dec 28, 2018 · 0 comments

Comments

@ShenHaiyi
Copy link

ShenHaiyi commented Dec 28, 2018

java.lang.NullPointerException: Attempt to invoke interface method 'void com.joker.api.wrapper.AnnotationWrapper$PermissionsProxy.granted(java.lang.Object, int)' on a null object reference
at com.joker.api.apply.NormalApplyPermissions.grantedWithAnnotation(NormalApplyPermissions.java:27)
at com.joker.api.wrapper.AbstractWrapper.requestPermissionWithAnnotation(AbstractWrapper.java:315)
at com.joker.api.wrapper.AbstractWrapper.request(AbstractWrapper.java:203)

初步判断dex分包后找不到PermissionsProxy导致返回了unll

public PermissionsProxy getProxy(String className) {
        String proxyName = className + "$$PermissionsProxy";
        try {
            return (PermissionsProxy)Class.forName(proxyName).newInstance();
        } catch (IllegalAccessException var4) {
            var4.printStackTrace();
        } catch (InstantiationException var5) {
            var5.printStackTrace();
        } catch (ClassNotFoundException var6) {
            // java.lang.ClassNotFoundException: Didn't find class "xxx$$PermissionsProxy" on path
            var6.printStackTrace();
        }
        return null;
    }
@ShenHaiyi ShenHaiyi changed the title 同#69问题 同#69 dex分包后NullPointerException Dec 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant