【错误描述】
在用Eclipse开发过程中,为了兼容Android2.2和4.0以上版本,我在使用Notification类时做了2个版本的代码,代码根据系统版本不同执行相应模块,结果,等我输完代码,发现系统提示了一个这么的错误。
【原因分析】
不详,可能和Run Android Lint有点关系吧。就是创建项目时,我们设置了最低版本API Level,比如我的是8,因此,Eclipse检查我调用的API后,发现版本号不能向低版本兼容,比如我用的“Notification.Builder”是Level 11 以上才有的,自然超过了8,所以提示错误。
【解决方案】
右键点击项目->Android tools ->Clear Link Markers.即可临时解决,但是如果调试用的模拟器是低版本的,则在调试完后还有这个错误。
如果把manifest文件中的user-sdk的android:minSdkVersion改为报错的那个高版本就没事。比如下面:
<uses-sdk
android:minSdkVersion="11" //这个之前是8
android:targetSdkVersion="17" />
【扩展】
这种错误不仅发生在Level11,也同时发生于其他因为设置了最低版本,但使用了高版本API的代码中,解决方案应该相同
相关推荐
当出现提示说: Call requires API level 9 (current min is 8): android.os.StrictMode#setThrea 也就是说版本低
v7包解决importandroid.support.annotation.RequiresApi
android-secure-preferences About This project uses the Encryption class from: ...Gives an implementation of SharedPreferences, which encrypts...Project requires API level 8 due to Base64 Android API level r
解决eclipse加载android adt时候的版本过高问题!
PubNub Android WebRTC Signaling API PnWebRTC is an Android module that makes WebRTC signaling easy! View the official PnWebRTC JavaDoc here. NOTE: This API uses PubNub for signaling to transfer the...
Requires API level 14 Download example apk Components ActionView A widget which can dynamically animate between defined Actions. ```xml You can dynamically change the action with: ```java actionView...
Plugin 'Lombok' (version '0.32-EAP') is not compatible with the current version of the IDE, because it requires build 203.* or older but the current build is AI-211.7628.21 这个异常信息是由于Lombok ...
前言 ...但是报错了Call requires API level 24 (current min is 21): android.telephony.TelephonyManager#getDataNetworkType Android 版本更替,新的版本带来新的特性,新的方法。 新的方法带来
The game requires Android 2.1 (API level 7) to run. It should run on pretty much any hardware, even the older models. Swipe the screen to launch a satellite. The longer the swipe, the higher the ...
error: #error "Qt requires C++11 support c++0x, c++11的解决办法 如果你是用makefile编译还好解决些,但是如果你是用CMake编译,你还得变成CMake的写法. 不过低层原理都一样,都是在g++上作文章. 我来告诉你makefile...
Failure [INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /data/app/vmdl1716187195.tmp/base.apk (at Binary XML file line #0): Requires newer sdk version #28 (current version is #27)]...
修改 ADT 24.0.2 支持 java 1.8,Elipse 报如下错误的都可以:Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead.
这个是android-support-v7的依赖库包,希望对你有用
更新android SDK 失败的解决方法,需要的朋友可以参考一下
最全的,解压后是jar文件,用于解决eclipse中 无法加载android.support.annotations的问题
Ultimate Android App Template [level: Beginner] This is a simple start-template to save you a little time. It doesn't use dagger // mvp // mvvp or any other stuff that requires an more in depth ...
androidx-annotation-1.0.0.jar
内含AndroidSDK,java-se,生成Debug Key的指令以及提前生成好可以直接调用的keystore文件
musicg is a lightweight audio analysis library, written in Java, with the purpose of extracting both high level and low level audio features. This API allows developers to extract audio features and ...
Requires MaintMode Live Install Allowed Live Remove Allowed Stateless Ready Overlay Yes No No Yes No History 2018-04-16: Version 8.045a: Changed package metadata to include proper dependencies and ...