vlady
vlady

Reputation: 497

jar and package won't work

I'm building a small game application. I've build the whole engine using java and seperated the engine from the logic, and it worked perfectly fine as a console and a swing-UI application.

now I want to migrate it into android and for some reason my emulator crashes each time I try to create any instance from the package I've build.

I added it to the project as a jar file (and added it to my path). afterwards I added the *.java package to the android project and it still crashes.

your help would be much appreciated.

Upvotes: 1

Views: 59

Answers (1)

gaborsch
gaborsch

Reputation: 15758

There may be a million reasons for this. Most likely reasons are:

  • You compile your code to Java 7 (you have different class format)
  • You use a dependency that is not present in the Android environment

Try to add your source to the source folder of your Android project, and let the Android environment compile it to you. Do not use the jar file. That will work for sure.

Upvotes: 1

Related Questions