Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NotificationCompat cannot be resolved to a type

I am newer to Android and receive the error message: "NotificationCompat cannot be resolved to a type"

MinSDK=9, TargetSDK=18,

As of yet, all sources are very vague on how to resolve this issue and simply note: "update the JAR files".

What JARs do I need and where can I find them, so that this issue is resolved?

like image 805
Sauron Avatar asked Jan 10 '14 22:01

Sauron


2 Answers

You need the support library. Here are the instructions on how to download them: http://developer.android.com/tools/support-library/setup.html

I needed to add "android-support-v4.jar" to my project to use the ActionBar.

like image 128
Embattled Swag Avatar answered Oct 06 '22 23:10

Embattled Swag


Sometimes Eclipse gets hung up on this class, and no amount of cleaning and rebuilding will make it recognize that you have, in fact, added the support library and imported the correct class. I don't know why it always happens with this particular class. But the solution is to close and restart Eclipse.

like image 21
Kevin Krumwiede Avatar answered Oct 07 '22 01:10

Kevin Krumwiede