Stuck With @suppresslint("newapi") (developer.android.com/training/basics/firstapp/starting-activity)
I'm a begginer with Android and currently stuck with the lession: http://developer.android.com/training/basics/firstapp/starting-activity.html In the part Create the Second Activit
Solution 1:
SuppressLint
annotation was added in API level 16. You need to either:
- set your build SDK to 16 or higher, or
- copy
tools/support/annotations.jar
from your Android SDK to the projectlibs
.
Solution 2:
import android.annotation.SuppressLint;
Solution 3:
I ran into the exact same problem. CTRL-SHIFT-o (organize imports) filled in the missing import for me.
Solution 4:
Your build target is NOT set to API Level 14 or higher. This is not a bug, please close this issue.
(In eclipse: Project => Properties => Android)
Solution 5:
Move your cursor over "SuppressLint", which will be underlined in red. Select the fix option "Fix project setup". From the popup list select "add archive 'annotations.jar'. Have a happy day.
Post a Comment for "Stuck With @suppresslint("newapi") (developer.android.com/training/basics/firstapp/starting-activity)"