Вопрос

I am using robotium tool in eclipse to create test cases. My doubt is every time i make any changes in any of the file i get error like

Call requires API level 3 (current min is 1)... Android Lint Problem

and when i do right click on project and then android tools->clear lint markers all those errors goes.But i am not getting why such lint errors comes on making any changes in the file?What is the reason for these lint errors.

Это было полезно?

Решение 2

I was having the same issue with Robotium and the lint markers. Instead of modifying any manifest files, I suggest disabling the minSDK lint check for your project that is using Robotium.

"Clear Lint Markers" removed the error temporarily, but it kept coming back every time I saved a file in the affected project.

Here's what worked for me:

Right click project -> Properties -> Android Lint Preferences

Search for "minSdk" in the search box

Click on "UsesMinSdkAttributes"

Click the "Ignore All" button at the bottom. Clean and rebuild the project, and Eclipse/ADT will no longer run the lint check for minSdk on your project.

Другие советы

You are using functionalities only available in newer API-levels than is your set minimum in android manifest file.

If you set <uses-sdk android:minSdkVersion="1" /> , you should not use any classes that were introduced in API-level 3.

Please refer this link. As it says,

Android Lint is a new tool introduced in ADT 16 (and Tools 16) which scans Android project sources for potential bugs. It is available both as a command line tool, as well as integrated with Eclipse (described below), and IntelliJ (details). The architecture is deliberately IDE independent so it will hopefully be integrated with other IDEs, with other build tools and with continuous integration systems as well.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top