简体   繁体   English

android test-project构建工具v17中的VerifyError

[英]VerifyError in android test-project build tools v17

Since installing v17 of the android build tools I am getting a VerifyError in my test project. 自安装v17的android构建工具后,我在我的测试项目中得到了一个VerifyError。

A short description of my project structure: 我的项目结构的简短描述:

All jar files exist in my main projects libs folder 所有jar文件都存在于我的主项目libs文件夹中

The test-project is a project that resides inside my main project 测试项目是一个驻留在我的主项目中的项目

All Instrumentation tests exist in the same package as my activities. 所有Instrumentation测试都与我的活动存在于同一个包中。

I have one jar that is only needed for the test projects in my libs folder in the test project 我有一个jar只需要测试项目中我的libs文件夹中的测试项目

Has anyone seen this? 有没有人见过这个? Its happening on all my projects since updating. 自更新以来,它发生在我的所有项目上。 Running the test produces an InstrumentationException: java.lang.VerifyError 运行测试会产生一个InstrumentationException:java.lang.VerifyError

x...@android.com made a temporary fix for an issue I reported: http://code.google.com/p/android/issues/detail?id=27608 . x ... @ android.com对我报告的问题进行了临时修复: http//code.google.com/p/android/issues/detail?id = 27608

You can try to see if the new anttasks.jar file can fix your problem. 您可以尝试查看新的anttasks.jar文件是否可以解决您的问题。

It fixed mine. 它固定了我的。 NoClassDefFoundError when running Instrumentation test with ant 使用ant运行Instrumentation测试时出现NoClassDefFoundError

In my case, I have a test project using the library of "robotium". 就我而言,我有一个使用“robotium”库的测试项目。 I'd had the same problem, and soleved by following steps, 我遇到了同样的问题,并通过以下步骤完成,

  1. "Properties > Java Build Path > Libraries", delete "Android Dependencies" in my test project. “属性> Java构建路径>库”,在我的测试项目中删除“Android依赖项”。
  2. "Properties > Java Build Path > Libraries", delete two robotium jar and click "Add JARs" to re-import robotium jar in my test project. “Properties> Java Build Path> Libraries”,删除两个robotium jar并单击“Add JARs”以在我的测试项目中重新导入robotium jar。
  3. "Properties > Java Build Path > Order and Export", check two checkbok of robotium jar (and othera you want exported.) “属性> Java构建路径>订单和导出”,检查robotium jar的两个checkbok(以及您想要导出的其他内容)。
  4. Clean my test project. 清理我的测试项目。

I think you also solve the problem, Good Luck! 我想你也解决了这个问题,祝你好运!

more information 更多信息

  • How to fix the “NoClassDefFoundError” with ADT 17 如何使用ADT 17修复“NoClassDefFoundError”
  • Dealing with dependencies in Android projects 处理Android项目中的依赖项
  • 在我的例子中,首先,在属性 - >构建路径 - >库中添加robotium-solo-2.5,然后将robotium-solo-2.5.jar移动到属性 - >构建路径 - >命令和导出的顶部,最后我解决这个有趣的问题容易...

    “属性> Java构建路径>订单和导出”,并检查要导出的所有引用。

    The way Android deals with dependencies has recently changed . Android处理依赖关系的方式最近发生了变化 If you are using eclipse, then just remove your jar imports and place them in a "libs"-folder in the project root, and everything will be imported automatically. 如果您正在使用eclipse,那么只需删除您的jar导入并将它们放在项目根目录中的“libs”文件夹中,所有内容都将自动导入。

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

    相关问题 Android 支持库 v17 - Android Support Library v17 适用于Eclipse的Android支持库v17 - Android Support Library v17 for Eclipse Android.apk 大小加倍,具体取决于自 v17 工具以来用于部署的开发箱 - Android .apk doubles size depending on dev box used to deploy since v17 tools 在ADT和SDK工具更新到v17之后,Gson NoClassDefFoundError - Gson NoClassDefFoundError after ADT and SDK Tools update to v17 如何在Android Test-Project(蚂蚁构建)中引用库项目 - How can I reference library project in an Android Test-Project (ant build) Android Studio中的布局和布局v17之间的区别 - Difference between layout and layout v17 in android studio android rtl 问题使用 v17 版本布局 - android rtl issue using v17 version layout 在 v17 版本上使用 appcompat - Using appcompat on version v17 当测试的项目在libs目录中有jar时,无法构建和运行使用“ant create test-project”创建的android测试项目 - Can't build and run an android test project created using “ant create test-project” when tested project has jars in libs directory 在没有源代码的情况下使Android测试项目可用(“make test of the test-project”) - Make Android test project available without source code (“make apk of the test-project”)
     
    粤ICP备18138465号  © 2020-2024 STACKOOM.COM