这里的android很新:)
我有一个通知构建器,如果应用程序目标版本大于4.0,则没有问题.但是当我切换到2.3时,我在此行上收到错误消息"Notificaiton.Builder无法解析为类型".
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();
Run Code Online (Sandbox Code Playgroud)
这个问题现在解决了!但是我现在有另一个它它在每个R(资源)上给我一个错误,我可以选择导入R.如果我导入它,它会给我每个资源的错误.
setContentView(R.layout.activity_main);
Run Code Online (Sandbox Code Playgroud)