本文主要是介绍contains class file com/google/protobuf/UnknownFieldSetLite.class, which is not in the whitelist,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
一、开始报错是:
Error: out/target/common/obj/JAVA_LIBRARIES/anwbtForFramework_intermediates/classes.jar contains class file com/google/protobuf/MapFieldLite$MutatabilityAwareIterator.class, which is not in the whitelist
这种错误一看就是在白名单里面没有加某个类。但是这明显是源码里面的类
我做的动态jar里面确实有import com.google.protobuf.InvalidProtocolBufferException;但是其实并没有用到这个类,所以注释掉。
但是还是报错,变成了
Error: out/target/common/obj/JAVA_LIBRARIES/anwbtForFramework_intermediates/classes.jar contains class file com/google/protobuf/UnknownFieldSetLite.class, which is not in the whitelist
然后我就找了下在Android.mk里面加了
LOCAL_STATIC_JAVA_LIBRARIES := \
libprotobuf-java-lite
去掉后,就没有这个问题了。
这篇关于contains class file com/google/protobuf/UnknownFieldSetLite.class, which is not in the whitelist的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!