简体   繁体   English

ADT R22 - Proguard - 找不到引用的类

[英]ADT R22 - Proguard - Can't find referenced class

For most of us the latest ADT update destroyed the whole workspace. 对于我们大多数人来说,最新的ADT更新破坏了整个工作区。 After hours of repairing my projects I am able to compile and run it again. 经过几个小时的修复我的项目后,我能够再次编译并运行它。 But Proguard is not working anymore. 但Proguard不再工作了。 I get tonnes of 我得到吨

can't find superclass or interface 找不到超类或接口

can't find referenced class 找不到引用的类

The project what I am trying to compile is using a lot of library projects. 我正在尝试编译的项目是使用了很多库项目。 I didn't change anything in code why I think that there is a problem with the exports of the corresponding library projects. 我没有更改代码中的任何内容为什么我认为相应的库项目的导出存在问题。

Does anyone has a solution for this? 有人有解决方案吗?

I, too, was frustrated by this problem after upgrading to ADT R22 in eclipse. 在eclipse中升级到ADT R22之后,我也对这个问题感到沮丧。

I noticed that if I created a new project then it would compile fine, even with proguard. 我注意到,如果我创建了一个新项目,那么即使使用proguard,它也可以正常编译。 After comparing the differences between the projects the following became apparent: the .classpath file was a bit different. 在比较项目之间的差异之后,以下变得明显:.classpath文件有点不同。

Try the following: 请尝试以下方法:

  1. Right-click your project and select "properties" at the bottom. 右键单击项目,然后选择底部的“属性”。
  2. Select "Java Build Path" on the left hand side. 选择左侧的“Java Build Path”。
  3. Select the "Order and Export" tab. 选择“订购和导出”选项卡。
  4. Click the select box for "Android Private Libraries" and ensure there is a tick in the box 单击“Android私有库”的选择框,确保框中有勾选
  5. Press "ok" 按“确定”

Your project should now be able to be exported and proguard should run correctly without any errors. 您的项目现在应该能够导出,并且proguard应该正确运行而不会出现任何错误。

This worked for all my projects, hopefully it will work for others too 这适用于我的所有项目,希望它也适用于其他项目

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

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