Open wudimeicom opened 9 years ago
I think the best way to go is to just remove the rhino dependency and use a WebView instead, will try to get this done soonish.
thank you! i add the code like below and work fine! lintOptions { abortOnError false }
Instead of ignoring all Lint errors (not a good idea), you can use a lint.xml
file such as this:
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="InvalidPackage">
<ignore regexp=".*rhino.*"/>
</issue>
</lint>
Put it in your app
folder.
Correctness InvalidPackage: Package not included in Android C:\Users\rong.gradle\caches\modules-2\files-2.1\org.mozilla\rhino\1.7R4\e982f2136574b9a423186fbaeaaa98dc3e5a5288\rhino-1.7R4.jar: Invalid package reference in library; not included in Android: java.awt.event. Referenced from org.mozilla.javascript.tools.debugger.ContextWindow. C:\Users\rong.gradle\caches\modules-2\files-2.1\org.mozilla\rhino\1.7R4\e982f2136574b9a423186fbaeaaa98dc3e5a5288\rhino-1.7R4.jar: Invalid package reference in library; not included in Android: java.awt. Referenced from org.mozilla.javascript.tools.debugger.ContextWindow. C:\Users\rong.gradle\caches\modules-2\files-2.1\org.mozilla\rhino\1.7R4\e982f2136574b9a423186fbaeaaa98dc3e5a5288\rhino-1.7R4.jar: Invalid package reference in library; not included in Android: javax.swing.event. Referenced from org.mozilla.javascript.tools.debugger.EvalTextArea. C:\Users\rong.gradle\caches\modules-2\files-2.1\org.mozilla\rhino\1.7R4\e982f2136574b9a423186fbaeaaa98dc3e5a5288\rhino-1.7R4.jar: Invalid package reference in library; not included in Android: javax.swing.filechooser. Referenced from org.mozilla.javascript.tools.debugger.SwingGui.1. C:\Users\rong.gradle\caches\modules-2\files-2.1\org.mozilla\rhino\1.7R4\e982f2136574b9a423186fbaeaaa98dc3e5a5288\rhino-1.7R4.jar: Invalid package reference in library; not included in Android: javax.swing.table. Referenced from org.mozilla.javascript.tools.debugger.ContextWindow. C:\Users\rong.gradle\caches\modules-2\files-2.1\org.mozilla\rhino\1.7R4\e982f2136574b9a423186fbaeaaa98dc3e5a5288\rhino-1.7R4.jar: Invalid package reference in library; not included in Android: javax.swing.text. Referenced from org.mozilla.javascript.tools.debugger.EvalTextArea. C:\Users\rong.gradle\caches\modules-2\files-2.1\org.mozilla\rhino\1.7R4\e982f2136574b9a423186fbaeaaa98dc3e5a5288\rhino-1.7R4.jar: Invalid package reference in library; not included in Android: javax.swing.tree. Referenced from org.mozilla.javascript.tools.debugger.MyTreeTable. C:\Users\rong.gradle\caches\modules-2\files-2.1\org.mozilla\rhino\1.7R4\e982f2136574b9a423186fbaeaaa98dc3e5a5288\rhino-1.7R4.jar: Invalid package reference in library; not included in Android: javax.swing. Referenced from org.mozilla.javascript.tools.debugger.ContextWindow. Priority: 6 / 10 Category: Correctness Severity: Error Explanation: Package not included in Android. 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.
More info:
To suppress this error, use the issue id "InvalidPackage" as explained in the Suppressing Warnings and Errors section.