2

I am trying to make a build with Proguard, but I get:

Warning: my.package.MyClass$innerClass: can't find referenced method...

But... This class doesn't exist anymore. I added the class, made a run (maybe also a clean/build by mistake), then removed the class (and made other changes), made a new run, and now I want to clean/build the current code.

But I can't because the build fails with Proguard trying to find a class that doesn't exist...

I tried to delete the entire .m2, with no success. Any idea what step I should do to make Proguard forget about this obsolete class ?

Thank you !

Sharcoux
  • 5,546
  • 7
  • 45
  • 78
  • if it is related to android, you must add right tag ;) – bananas Aug 30 '16 at 06:35
  • No it's not. But thanks. – Sharcoux Aug 30 '16 at 06:44
  • try maven>update project then clean/build – bananas Aug 30 '16 at 06:45
  • Seems good. I am using netbeans. I checked in Options -> Java -> Maven, but couldn't find any "update project" option. I can search for that, but what is it supposed to update compare to "clean" ? – Sharcoux Aug 30 '16 at 06:52
  • 1
    ok right click on project>check for maven and when you update project click on force update on snapshot – bananas Aug 30 '16 at 06:52
  • 1
    read here (http://stackoverflow.com/questions/20546962/what-does-maven-update-project-do-in-eclipse) – bananas Aug 30 '16 at 06:55
  • Ok, I found an option to `reload pom`, which I did, and a Maven option to `update-snapshots` which I activated. But still the same... – Sharcoux Aug 30 '16 at 07:01
  • 1
    you must add maven tag to get relevent attention – bananas Aug 30 '16 at 07:03
  • 1
    True, didn't think about it. Thanks for your advice. – Sharcoux Aug 30 '16 at 07:05
  • 1
    Oh ! Wait, I think it is working. I don't know exactly why, but I found somewhere that I could run maven clean install -U and it seems to work now. – Sharcoux Aug 30 '16 at 07:29
  • 1
    this is reason I still use ant ;) – bananas Aug 30 '16 at 07:30
  • Oh yeah. I'm so tired of Maven... But it was already so complicated to make everything work the way I needed that I'm not psychologically ready to restart this little game ! – Sharcoux Aug 30 '16 at 07:33
  • I found the -U on http://stackoverflow.com/questions/4701532/force-maven-update. Still not sure if it is this that fixed the issue. You can add it as an answer though. You deserve the points. – Sharcoux Aug 30 '16 at 07:38
  • check the link i provided you,it can be useful :) – bananas Aug 30 '16 at 07:41
  • True, but I couldn't find anything similar on NetBeans, and I didn't really wanted to install and parametrize Eclipse just to update my project :p – Sharcoux Aug 30 '16 at 07:45

1 Answers1

0

When this happens, the solution is to run:

mvn clean install -U

It is supposed to force reloading dependencies. I am not entirely sure why it has something to do with the cache of Proguard, but I am now sure that it works.

Find more details here

Community
  • 1
  • 1
Sharcoux
  • 5,546
  • 7
  • 45
  • 78