简体   繁体   English

Android意图过滤器VerifyError

[英]Android Intent-filter VerifyError

I have a rather unusual issue. 我有一个不寻常的问题。 My program works fine when opened directly. 直接打开程序时,我的程序运行良好。 When opened via an intent-filter custom extension match it crashes with a VerifyError. 通过意图过滤器自定义扩展名匹配打开时,它会崩溃并带有VerifyError。 The class it can't find is in library jar in a java project dependency. 它找不到的类在java项目依赖项的库jar中。

Bear in mind this works perfectly when opened from the app drawer. 请记住,当从应用程序抽屉中打开时,这非常有效。

As a quick check I copied the jar from the java project dependency into my Android project. 作为快速检查,我将jar从java项目依赖项复制到了我的Android项目中。 Afterwards it runs fine even from an intent-filter extension match. 之后,即使通过意图过滤器扩展匹配,它也可以正常运行。

Does anyone know why the class lookup would behave differently based on the intent-filter match? 有谁知道为什么类查找基于意图过滤器匹配会有所不同?

I decided to try converting the java project to an android library and it was relatively simple. 我决定尝试将java项目转换为android库,这相对简单。 After conversion I no longer needed to copy the sub-library to the main Android project, it worked right from the Android library. 转换后,我不再需要将子库复制到主Android项目,它可以直接在Android库中运行。 I'm not sure why the java library almost worked , but I suppose it's best to simply convert everything to Android if possible. 我不确定java库为什么能正常工作 ,但是我想最好是尽可能将所有内容都转换为Android。

Here's a link for conversion: 这是转换链接:

Convert existing project into Android project in Eclipse? 在Eclipse中将现有项目转换为Android项目?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM