016 AGPBI: {"kind":"error","text":"Illegal class file: Class module-info is missing a super type.","sources":[{"file":"C:UsersPeter.gradlecachesmodules-2files-2.1com.google.code.gsongson2.8.69180733b7df8542621dc12e21e87557e8c99b8cbgson-2.8.6.jar"}],"tool":"D8"}
com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:UsersPeter.gradlecachesmodules-2files-2.1com.google.code.gsongson2.8.69180733b7df8542621dc12e21e87557e8c99b8cbgson-2.8.6.jar
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:720)
解决办法:
Android Studio 3.1.1 打Jar包出现AGPBI异常解决
1、在app module的build.gradle文件中,将
apply plugin: ‘com.android.application’
修改为:
apply plugin: ‘com.android.library’
2、注释掉:applicationId