Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADT R22 - Proguard - Can't find referenced class

For most of us the latest ADT update destroyed the whole workspace. After hours of repairing my projects I am able to compile and run it again. But Proguard is not working anymore. 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?

like image 618
Basic Coder Avatar asked May 19 '13 11:05

Basic Coder


1 Answers

I, too, was frustrated by this problem after upgrading to ADT R22 in eclipse.

I noticed that if I created a new project then it would compile fine, even with proguard. After comparing the differences between the projects the following became apparent: the .classpath file was a bit different.

Try the following:

  1. Right-click your project and select "properties" at the bottom.
  2. Select "Java Build Path" on the left hand side.
  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
  5. Press "ok"

Your project should now be able to be exported and proguard should run correctly without any errors.

This worked for all my projects, hopefully it will work for others too

like image 181
cad Avatar answered Nov 10 '22 03:11

cad