Matthias
Matthias

Reputation: 10389

ProGuard: can't find referenced class (to R.java)

I have an Android app that references to a library Android project. That setup basically works fine (as debug release in Eclipse). However, when I try to export a signed release apk of the main app, with ProGuard enabled in project.properties, export fails.

Problem seems to be that ProGuard can't find the resource class R.java of the referenced library project, because all warnings complain about R$string, R$layout, etc. of that library project.

I am using Android's default proguard.cfg file.
Do I need any changes in that case?

Thanks in advance!

Upvotes: 2

Views: 2136

Answers (1)

Matthias
Matthias

Reputation: 10389

I indeed had to include the path to the library project source folder with the -libraryjars switch in the proguard.cfg file.

Upvotes: 1

Related Questions