Pretty new in android here :)
I have a notification builder that works without problems if the target version of the application is> 4.0. However, when I switch to 2.3, I get an error message on this line that says: "Notificaiton.Builder cannot be resolved to type".
Notification notification = new Notification.Builder(this)
.setSmallIcon(drawable_small)
.setLargeIcon(drawable_big)
.setWhen(System.currentTimeMillis()).setTicker(content_title)
.setContentTitle(content_title).setContentInfo(content_info)
.setContentText(content_text).setContentIntent(pIntent)
.getNotification();
Now this problem is solved! However, I have one more. It gives me an error for each R (resource), and I have the Import R option. If I import it, it will give me errors on each resource.
setContentView(R.layout.activity_main);
source
share