First off, if you haven't already, read the android developers Proguard article for an introduction and overview of how to set it up in Eclipse. http://developer.android.com/guide/developing/tools/proguard.html
The jist of it is, in your default.properties file, just add a new entry for proguard.config set equal to the location of your proguard.cfg. If you have any special obfuscation configuration/exceptions, you can include it in the .cfg file. Read the proguard doc for more detailed information.
You're not ready to export your application yet. You need to create a new system variable (Windows: Control Panel->Advanced system settings, Advanced (tab)->Environment Variables->New...(under System variables). Set up the Variable name as "PROGUARD_HOME", and Variable value as \tools\proguard (for instance, my android sdk is located in c:\android, so my Variable value would be "c:\android\tools\proguard"). For Mac/Linux, if you are using those OSes, then you should know how to add the Environment variables there.
If you have Eclipse running while you are doing these procedures, restart it. You should be able to export your application now. Otherwise you will get the this ugly mess
eclipse.buildId=M20100909-0800java.version=1.6.0_12java.vendor=Sun Microsystems Inc.BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_USFramework arguments: -product org.eclipse.epp.package.java.productCommand-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.productErrorSun Dec 12 20:57:31 PST 2010Failed to export applicationcom.android.ide.eclipse.adt.internal.build.ProguardResultExceptionat com.android.ide.eclipse.adt.internal.build.BuildHelper.runProguard(Unknown Source)at com.android.ide.eclipse.adt.internal.project.ExportHelper.exportReleaseApk(Unknown Source)at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard.doExport(Unknown Source)at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard.access$0(Unknown Source)at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard$1.run(Unknown Source)at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Happy coding and thank you Google for making it so much easier! I spent hours trying to re-setup and publish my app on a new Windows 7 install and this saved me the trouble.
Update: credit to this post for the fix http://osdir.com/ml/Android-Developers/2010-12/msg00965.html
Although having very similar names, Java and JavaScript are totally two different
ReplyDeletelanguages separately but they are able to create the web-based applications.
JavaScript is supported by all browsers, but Java is not.To learn more:
java training