android - What will happen if i run a apk with high api compiled in a low api device? -


now have project, is compiled api 14. "is compiled", mean project.properties file has line "target=android-14". but, defined android:minsdk=8 in androidmanifest.xml.

in project, used high api features, android.animation.valueanimator, android.app.actionbar. project, of course, run in high api device.

since minsdk 8, can install apk in 2.x devices, happen then? valueanimator , actionbar erased? or cannot install apk in 2.x devices?

if app loaded memory logcat warnings if classes/methods cannot resolved. example:

i/dalvikvm﹕ not find method java.lang.string.isempty, referenced method eu.lp0.slf4j.android.loggerfactory.getconfig w/dalvikvm﹕ vfy: unable resolve virtual method 524: ljava/lang/string;.isempty ()z d/dalvikvm﹕ vfy: replacing opcode 0x6e @ 0x0010 d/dalvikvm﹕ vfy: dead code 0x0013-0044 in leu/lp0/slf4j/android/loggerfactory;.getconfig (ljava/lang/string;)leu/lp0/slf4j/android/loggerconfig; 

if app trying execute code not supported device exception nosuchmethoderror or classnotfoundexception

w/dalvikvm﹕ exception ljava/lang/nosuchmethoderror; thrown during lde/k3b/android/cellinfo/demo/cellinfodemoactivity;. 

here complete example logcat: https://github.com/lp0/slf4j-android/issues/2

to avoid calling methods/classes device not support can use code this

if (build.version.sdk_int >= build.version_codes.honeycomb) {   // call method/class available in honeycomb , later } 

for more details see https://developer.android.com/guide/practices/compatibility.html


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -