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

使用java8,开启jack编译 #10

Closed
zengbobo0805 opened this issue Jun 29, 2017 · 1 comment
Closed

使用java8,开启jack编译 #10

zengbobo0805 opened this issue Jun 29, 2017 · 1 comment

Comments

@zengbobo0805
Copy link

application build.gradle配置***************

android {
    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 25
         ......
        //开启jack编译
        **jackOptions {
            enabled true
        }**
    }
      ......
    compileOptions {
        sourceCompatibility **JavaVersion.VERSION_1_8**
        targetCompatibility **JavaVersion.VERSION_1_8**
    }
}

报错**************

> 06-29 17:16:08.157 21869-21869/com.netease.nim.demo E/AndroidRuntime: FATAL EXCEPTION: main
>                                                                       Process: com.netease.nim.demo, PID: 21869
>                                                                       java.lang.IllegalAccessError: Illegal class access: 'com.netease.nimlib.sdk.NIMClient' attempting to access 'com.netease.nimlib.r.g' (declaration of 'com.netease.nimlib.sdk.NIMClient' appears in /data/app/com.netease.nim.demo-1/base.apk)
>                                                                           at com.netease.nimlib.sdk.NIMClient.init(Unknown Source)
>                                                                           at com.netease.nim.demo.NimApplication.onCreate(NimApplication.java:68)
>                                                                           at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
>                                                                           at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5403)
>                                                                           at android.app.ActivityThread.-wrap2(ActivityThread.java)
>                                                                           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)
>                                                                           at android.os.Handler.dispatchMessage(Handler.java:102)
>                                                                           at android.os.Looper.loop(Looper.java:154)
>                                                                           at android.app.ActivityThread.main(ActivityThread.java:6119)
>                                                                           at java.lang.reflect.Method.invoke(Native Method)
>                                                                           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
>                                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

# 错误分析*****

qq 20170629173248

@zengbobo0805
Copy link
Author

这个要怎么改啊,为什么其他类文件不会有这个问题,这个类有什么特别吗?!

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

2 participants