Android: able to install app for unsupported Android version -
we're dropping support android 2.3 (api level 9) devices because of our users have newer android version on phones. i've updated minimum sdk version api level 14.
android { compilesdkversion 23 buildtoolsversion "23.0.2" defaultconfig { minsdkversion 14 targetsdkversion 23 } }
however i'm still able install app on android 2.3 devices manually (not store). expected behavior or doing wrong? couldn't find answer somewhere else.
another strange issue lint doesn't detect correct api level.
listview.setfastscrollalwaysvisible(true);
this results in warning: call requires api level 11 (current min 9). current minimum 14. indicates me did wrong. tried cleaning , rebuilding project, restarting android studio. didn't work.
can me out?
edit
based on sufians comment started fiddling around gradle files , came following solution. questions still remain. project structure looks this:
- android.gradle (top-level build file contains sdk versions)
- main module (contains base code other modules)
- build.gradle (apply from: '../android.gradle')
- sub module (module specific changes)
- build.gradle (has dependency on main module)
- sub module b (module specific changes)
- build.gradle (has dependency on main module)
i have top-level build file android.gradle
contains sdk versions. modules include build file apply from: '../android.gradle'
. if put minsdkversion directly in de main module warnings disappear. way should be? or need set minsdkversion every submodule? or there way sdk versions can stay within android.gradle
file?
ok... realized there nothing wrong in project structure. thing needed press little 'sync project gradle files' button. after errors disappear.
also concluded it's possible install unsupported apps manually. google play store should prevent users installing or updating app.
Comments
Post a Comment