2

I'm writing an app with Android platform, In my app im using some external jars, due to some errors connected with version of common codecs in android SDK I had to change one of functions in external jar like here Apache Commons Codec with Android: could not find method and export project to new jar file. I have deleted old jar file from android project i have cleaned build added new jar file and now all the time i recieve such an error :

    Error:Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_25\bin\java.exe'' finished with non-zero exit value 1

Maybe build clean does not work as I think it should and it does not delete old version of jar file?

Community
  • 1
  • 1
whd
  • 1,819
  • 1
  • 21
  • 52

3 Answers3

1

The problem is compiling. Change compile options to Java 6.

compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_6
        targetCompatibility JavaVersion.VERSION_1_6
    }
josedlujan
  • 5,357
  • 2
  • 27
  • 49
1

Change the jdk version to 1.7: for change go to Project Structure > SDK Location > JDK Location. this is work for me. I hope work for you. enter image description here

eliasetm
  • 1,399
  • 11
  • 20
0

Thanks for all of clues, actually what i had to do was, in eclipse set jdk to 1.7 and recompile it with such settings then add it do android project.

whd
  • 1,819
  • 1
  • 21
  • 52