Android: Setting maxSDK version for Android 1.5 app

…衆ロ難τιáo~ 提交于 2019-12-11 19:44:14

问题


I've released an android app with the property

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>

now my app seems to crash on android 1.5 devices (i guess because i use drawable-mdpi/hdpi,...)

so thought it would be good to release the same app just for 1.5 devices (not using the mdpi/hdpi-directories). but when i use

<uses-sdk android:minSdkVersion="3" 
      android:targetSdkVersion="3"
      android:maxSdkVersion="3" />

it doesn't compile for 1.5 (it states that target and maxsdkversion are unknown properties). (if i set the jar-sdk to 1.6 it works fine).

So what is the best way to solve my problem? Is the app runable if I compile with 1.6 sdk but restrict it to sdk 3 (1.5) ? Or would this also crash since the sdk3 doesn't know the manifest-attributes "target/maxSdkVersion"?

Any other ideas how to solve this?


回答1:


you need a drawable-v3 entry in res folder for android 1.5..

your minSdk will read 3 targetSDKVersion will read 4

That should get rid of all crashes..



来源:https://stackoverflow.com/questions/2745168/android-setting-maxsdk-version-for-android-1-5-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!