-1

So I have an executable Android project, it runs and works well. I have made a library for it, separate project, only using java, not Android framework.

No I would like to make a .jar from my library and add it to my Android Proejct.

I have made it so far, but when I run it I get the following error:

in short:

Caused by: com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)

In long.

I have added the .jar dependency to my gradle file: (It is the task_server_core.jar)

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile files('libs/task_server_core.jar')
    compile 'com.android.support:appcompat-v7:21.+'
}

And both projects made with java 1.8.0_45

What m I doing wrong?

Adam Varhegyi
  • 11,307
  • 33
  • 124
  • 222

1 Answers1

0

Changed both Android project's and java lib project's JAVA version to 1.7 solved the problem.

Adam Varhegyi
  • 11,307
  • 33
  • 124
  • 222