Is my first time using Proguard. I’m testing it in a example project with following code (Just for check when the stacktrace is obfuscated)
package com.proguardtest;
import android.app.Activity;
import android.os.Bundle;
public class ProguardTestActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
try{
Integer.parseInt("Test");
} catch (Exception e){
e.printStackTrace();
}
}
}
So I create a new project and go to the file:
default.properties and add the line
proguard.config=proguard.cfg
thats the resulting file:# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.
# Project target.
target=android-7
proguard.config=proguard.cfg
Then I try to generate the apk with the export wizard (Eclipse Windows) and at the last step when I have selected the path for the apk a error dialog appears showing Conversion to dalvik failed.
What am I doing wrong?
Thanks in advance
Upgrade to ProGuard 4.6 (download it, extract the .zip file, copy to ..\android-sdk\tools\proguard)