我尝试使用Android Studio 1.0.2构建Android项目。 该项目使用以下库:Cling UPNP / DLNA和Jetty。 当我在设备上运行APK时出现此错误:
java.lang.VerifyError: org/eclipse/jetty/servlet/ServletHandler
at org.eclipse.jetty.servlet.ServletContextHandler.newServletHandler(ServletContextHandler.java:207)
at org.eclipse.jetty.servlet.ServletContextHandler.getServletHandler(ServletContextHandler.java:288)
at org.eclipse.jetty.servlet.ServletContextHandler.addServlet(ServletContextHandler.java:324)
at org.fourthline.cling.transport.impl.jetty.JettyServletContainer.registerServlet(JettyServletContainer.java:132)
at org.fourthline.cling.transport.impl.AsyncServletStreamServerImpl.init(AsyncServletStreamServerImpl.java:74)
at org.fourthline.cling.transport.RouterImpl.startAddressBasedTransports(RouterImpl.java:434)
at org.fourthline.cling.transport.RouterImpl.enable(RouterImpl.java:132)
at org.fourthline.cling.android.AndroidRouter.enable(AndroidRouter.java:92)
at org.fourthline.cling.UpnpServiceImpl.<init>(UpnpServiceImpl.java:87)
at org.fourthline.cling.android.AndroidUpnpServiceImpl$1.<init>(AndroidUpnpServiceImpl.java:54)
at org.fourthline.cling.android.AndroidUpnpServiceImpl.onCreate(AndroidUpnpServiceImpl.java:54)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2656)
at android.app.ActivityThread.access$1600(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1329)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5226)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
at dalvik.system.NativeStart.main(Native Method)
我使用此依赖项(libs文件夹中的.JAR):
jetty-security-8.1.8.v20121106.jar
jetty-http-8.1.8.v20121106.jar
jetty-continuation-8.1.8.v20121106.jar
jetty-io-8.1.8.v20121106.jar
jetty-util-8.1.8.v20121106.jar
jetty-server-8.1.8.v20121106.jar
jetty-servlet-8.1.8.v20121106.jar
jetty-client-8.1.8.v20121106.jar
servlet-api-3.0.1.jar
我尝试添加此
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
到&#34; android&#34; build.gradle的一部分,但它没有帮助。 有没有人遇到类似的?