unit testing - Can Android use standard built JAR files? -


im pretty sure answer no, im using new intellij eap version , have project worked on while written against jdk 1.6 applet based application.

however see how useful in android app im interested in creating.

do have re-write code/tests again targeting android sdk or can drop in existing jar file , use android ui layer.

its android seems make testing way harder needs be, , have alot of existing tests written , working, if wasnt hard write quick unit test (standard junit @test style) wouldnt mind porting, dont whole instrumentation thing, dont need ui @ moment...

anyway point, can use existing jdk built code in android app?

no!

android uses "dalvik" vm project harmony uses different set of bytecodes incompatable standard java jvm bytecodes.

this done both optimise vm opreration on mobile platforms, and, more importantly try , avoid copyright , patent disputes sun , oracle.

more info here

however there tool called "dx" can perform conversion in dev environment.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -