我没有控制这个第三方图书馆,所以应该做什么.
lint错误如下:
库中无效的包引用;不包括在Android中:javax.management.openmbean.从twitter4j.management.APIStatisticsOpenMBean引用.
Issue: Finds API accesses to APIs that are not supported in Android
Id: InvalidPackage
This check scans through libraries looking for calls to APIs that are not included in Android.
When you create Android projects,the classpath is set up such that you can only access classes in the API packages that are included in Android. However,if you add other projects to your libs/ folder,there is no guarantee that those .jar files were built with an Android specific classpath,and in particular,they Could be accessing unsupported APIs such as java.applet.
This check scans through library jars and looks for references to API packages that are not included in Android and flags these. This is only an error if your code calls one of the library classes which wind up referencing the unsupported package.
解决方法
<?xml version="1.0" encoding="UTF-8"?> <lint> <issue id="InvalidPackage"> <ignore path="libs/twitter4j-core-3.0.5.jar" /> </issue> </lint>
Lint的Comand线选项可以在http://developer.android.com/tools/help/lint.html找到
原文地址:https://www.jb51.cc/android/310596.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。