dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42490
Re: Dhis2 Android SDK setup
This seems to be a problem with the Java SDK version you are using on your
machine. You are probably using JDK 8, where as the SDK is expecting Java 7.
You can either compile using Java 7 or change this file -
https://github.com/dhis2/dhis2-android-sdk/blob/master/core/build.gradle
I'm not quite sure what incompatibilities might occur after changing the
following in that file.
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
---
Regards,
Saptarshi PURKAYASTHA, Ph.D.
Visiting assistant professor
Department of BioHealth Informatics, IUPUI
On 14 January 2016 at 01:26, Apoorv Patel <patelapoorv9990@xxxxxxxxx> wrote:
> Hi Team,
>
> I am trying to integrate the DHIS2 SDK into my project but when I try to
> set it up the gradle sync does not give any errors but when I try to run
> the app it gives me the following error
>
>
>
> UNEXPECTED TOP-LEVEL EXCEPTION:
> java.lang.RuntimeException: Exception parsing classes
> at com.android.dx.command.dexer.Main.processClass(Main.java:752)
> at com.android.dx.command.dexer.Main.processFileBytes(Main.java:718)
> at com.android.dx.command.dexer.Main.access$1200(Main.java:85)
> at
> com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1645)
> at
> com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
> at
> com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
> at
> com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
> at com.android.dx.command.dexer.Main.processOne(Main.java:672)
> at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
> at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
> at com.android.dx.command.dexer.Main.run(Main.java:277)
> at com.android.dx.command.dexer.Main.main(Main.java:245)
> at com.android.dx.command.Main.main(Main.java:106)
> Caused by: com.android.dx.cf.iface.ParseException: bad class file magic
> (cafebabe) or version (0034.0000)
> at
> com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
> at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
> at
> com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
> at
> com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
> at com.android.dx.command.dexer.Main.parseClass(Main.java:764)
> at com.android.dx.command.dexer.Main.access$1500(Main.java:85)
> at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684)
> at com.android.dx.command.dexer.Main.processClass(Main.java:749)
> ... 12 more
> 1 error; aborting
> Error:Execution failed for task ':app:preDexDebug'.
> > com.android.ide.common.process.ProcessException:
> org.gradle.process.internal.ExecException: Process 'command 'C:\Program
> Files\Java\jdk1.8.0_65\bin\java.exe'' finished with non-zero exit value 1
>
> Can you give me some idea on how to go about solving this?
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help : https://help.launchpad.net/ListHelp
>
>
Follow ups
References