开发者

Android minSdkVersion

开发者 https://www.devze.com 2023-03-11 09:10 出处:网络
I wrote a program that worked perfectly until th开发者_StackOverflow社区e market required me to add \'minSdkVersion\'.Since I was using 2.3.3 capabilities I set it at 10,but then my program stopped be

I wrote a program that worked perfectly until th开发者_StackOverflow社区e market required me to add 'minSdkVersion'. Since I was using 2.3.3 capabilities I set it at 10,but then my program stopped being able to access files from the disk (all file access is false though it works without 'minSdkVersion'). Changing it to require API 1 fixed the functionality but now inadequate OS versions can download it. Should the 'minSdkVersion' be able to change actual functionality? Any ideas what could cause this?


You should set minSdkVersion to the lowest adequate OS version for your app. Don't forget to also set targetSdkVersion to the highest level for which your app has been tested.


I'm going to assume when you say "access files" you mean on the SD card. In this case, you need to add 2 new permissions:

    <uses-permission 
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> 
    <uses-permission 
android:name="android.permission.READ_EXTERNAL_STORAGE"/> 

These permissions weren't added until API level 4, so anything below that gets them for free.

0

精彩评论

暂无评论...
验证码 换一张
取 消