2

I am trying to install an FPC program on to android device by following this article.

While creating .dex file by giving the input as .jar (classes.jar) file, it is giving the following error.

MacBookPro:src Sreehari$ /Library/android-sdk-macosx/build-tools/23.0.2/dx --dex --output=bin/classes1.dex eu/blaisepascal/skeletonapp/skeltonapp.jar Uncaught translation error: com.android.dx.cf.code.SimException: local 0002: invalid 1 error; aborting

I have seen on internet that it is because of not giving pro-guard, is it true? How do I give pro-guard?

Chait
  • 1,052
  • 2
  • 18
  • 30

3 Answers3

1

It can also happen when you have "Instant Run" enabled

Julian Horst
  • 805
  • 8
  • 15
0

Not sure what you mean by giving pro-guard but I will give a general answer to the problem as I encountered the same error in the past and this is what worked for me.

The simplest way of solving this compilation error is by setting minifyEnabled to false in your build's gradle file. This solution will skip running pro-guard among minifying the apk size, something that's not acceptable in many situations.

The more general solution is to update google play services or find a library used in your project that's using an old version of it.

0

Try to disable Instant Run in Android Studio

  1. Open the Settings or Preferences (Mac) dialog.
  2. Navigate to Build, Execution, Deployment > Instant Run.
  3. Uncheck the box next to disable Instant Run.
Yao Li
  • 2,071
  • 1
  • 25
  • 24