简体   繁体   English

ProGuard:找不到引用的类(到R.java)

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

I have an Android app that references to a library Android project. 我有一个引用图书馆Android项目的Android应用。 That setup basically works fine (as debug release in Eclipse). 该设置基本上可以正常工作(作为Eclipse中的调试版本)。 However, when I try to export a signed release apk of the main app, with ProGuard enabled in project.properties, export fails. 但是,当我尝试在project.properties中启用ProGuard导出主应用程序的签名发行apk时,导出失败。

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. 问题似乎是ProGuard找不到引用的库项目的资源类R.java,因为所有警告都抱怨该库项目的R $ string,R $ layout等。

I am using Android's default proguard.cfg file. 我正在使用Android的默认proguard.cfg文件。
Do I need any changes in that case? 在这种情况下,我需要任何更改吗?

Thanks in advance! 提前致谢!

我确实必须在proguard.cfg文件中使用-libraryjars开关包括库项目源文件夹的路径。

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

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