Android Call requires API level 9 (current min is 4

转:http://blog.sina.com.cn/s/blog_77c632410101gtvy.html


【错误描述】

    在用Eclipse开发过程中,当涉及到系统版本不同时,会出现系统提示错误。
【原因分析】
    不详,可能和Run Android Lint有点关系吧。就是创建项目时,我们设置了最低版本API Level,比如是8,因此,Eclipse检查我调用的API后,发现版本号不能向低版本兼容,比如用的控件是Level9 以上才有的,超过了8,所以提示错误。
【解决方案】
   右键点击项目->Android tools ->Clear Link Markers.即可临时解决,但是如果调试用的模拟器是低版本的,则在调试完后还有这个错误。
  如果把manifest文件中的user-sdk的android:minSdkVersion改为报错的那个高版本就没事。比如下面:
 

    

<span style="font-size:18px;"><?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
	  package="org.crazyit.progress"
	  android:versionCode="1"
	  android:versionName="1.0">
    <uses-sdk android:minSdkVersion="9"/>
	<application android:icon="@drawable/icon" android:label="@string/app_name" android:hasCode="true">
		<activity android:name=".ProgressBarTest"
				  android:label="@string/app_name">
			<intent-filter>
				<action android:name="android.intent.action.MAIN" />
				<category android:name="android.intent.category.LAUNCHER" />
			</intent-filter>
		</activity>

	</application>


</manifest> </span>



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值