ProGuard problems
emilan opened this issue · 10 comments
I get the following errors when using ProGuard on a project using SignalA 0.16. I haven't tried it with earlier versions of SignalA but from the output I can guess it is because of the "Changed package names to lowercase" change.
Proguard returned with error code 1. See console
Warning: class [com/zsoft/signala/BuildConfig.class] unexpectedly contains class [com.zsoft.SignalA.BuildConfig]
Warning: class [com/zsoft/signala/R$attr.class] unexpectedly contains class [com.zsoft.SignalA.R$attr]
Warning: class [com/zsoft/signala/R$drawable.class] unexpectedly contains class [com.zsoft.SignalA.R$drawable]
Warning: class [com/zsoft/signala/R$string.class] unexpectedly contains class [com.zsoft.SignalA.R$string]
Warning: class [com/zsoft/signala/R$style.class] unexpectedly contains class [com.zsoft.SignalA.R$style]
Warning: class [com/zsoft/signala/R.class] unexpectedly contains class [com.zsoft.SignalA.R]
Warning: there were 6 classes in incorrectly named files.
You should make sure all file names correspond to their class names.
The directory hierarchies must correspond to the package hierarchies.
If you don't mind the mentioned classes not being written out,
you could try your luck using the '-ignorewarnings' option.
java.io.IOException: Please correct the above warnings first.
Strange. Are you building from source or using the aar from Maven central?
It seems like my changes of directory names to lowercase was not commited to the repo.
I am using Eclipse, so I've not bothered setting up the projects but simply extracted the jar files from the aar's from the Maven web page. I also just tried with the jars from 0.15 and they worked. Both failed classes (BuildConfig and R) are generated by the android tools and I see that in AndroidManifest.xml, you have the code below. If you fix the casing there, it'll probably work.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zsoft.SignalA"
android:versionCode="5"
android:versionName="0.16" >
I don't get the same errors as you do, but I'm using Android Studio.
Anyway, I've uploaded a snapshot where I made the changes you suggested. You can download the snapshot here, https://oss.sonatype.org/content/repositories/snapshots/com/github/erizet/signala/signala/0.17-SNAPSHOT/
Please tell me if this works for you!
I don't know if those classes are required. What are they used for? SignalA don't use any resources so I guess that the R class is not used at all.
I also looked into an old version of SignalA, 0-14-snapshot. As far as I can tell the buildconfig and R classes are not in that jar either.
R is, as you say, resources. BuildConfig contains (from what I've found on the web) a flag to tell the code if it is in debug mode or not. I guess neither of them is needed if you don't use the debug flag or resources.
fixed in version 0.20
Please, start a new issue. This does not seem to be a ProGuard problem.
How can I do with the Message loss ,The.Net server receives can not receive, the Android client can not receive