6.0通知栏去掉了
notification.setLatestEventInfo(context, tipTitle, msg, contentIntent);
方法
可以使用如下方法替换:
http://zhidao.baidu.com/link?url=aZe1zgBSBsf9xCYNpcz2fVAy1O1SqOoFSptNZdyLbs8DZVh0f7kbx4AsJ8UFqubdFR8xWmTwT7eTgG2yyp6UX07cMQ1MCxN6dWUZlQmUfLu

原始的:NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);            Notification notification = new Notification(                    R.drawable.ic_launcher, "title", System.currentTimeMillis());            notification.defaults = 0;            Uri uri = Uri.parse("http://baidu.com");            Intent intent = new Intent(Intent.ACTION_VIEW, uri);            intent.setComponent(null);            PendingIntent pi = PendingIntent.getActivity(                    getApplicationContext(), 0, intent, 0);            notification.setLatestEventInfo(getApplicationContext(), "title",                    "content", pi);            mNotificationManager.notify(1000, notification);V4的:NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);            NotificationCompat.Builder builder = new NotificationCompat.Builder(                    getApplicationContext());            builder.setSmallIcon(R.drawable.ic_launcher);            builder.setDefaults(0);            builder.setAutoCancel(true);            builder.setContentTitle("title");            builder.setContentText("content");            Uri uri = Uri.parse("http://baidu.com");            Intent intent = new Intent(Intent.ACTION_VIEW, uri);            intent.setComponent(null);            PendingIntent pendingIntent = PendingIntent.getActivity(                    getApplicationContext(), 0, intent, 0);            builder.setContentIntent(pendingIntent);            mNotificationManager.notify(1000, builder.build());

如果把版本提高至22以上出现这个问题
Error retrieving parent for item: No resource found that matches the given name ‘android:Widget.Material.Button.Colored’.
参考如下方法解决:
1.
http://stackoverflow.com/questions/26530415/error-in-styles-base-xml-file-android-app-no-resource-found-that-matches-the

Go to your Android SDK installed directory then extras > android > support > v7 > appcompat.in my case : D:\Software\adt-bundle-windows-x86-20140702\sdk\extras\android\support\v7\appcompatonce you are in appcompat folder ,check for project.properties file then change the value from default 19 to 21 as : target=android-21. save the file and then refresh your project. Then clean the project : In project tab , select clean option then select your project and clean... This will resolve the error. enjoy coding...

2.http://bbs.csdn.net/topics/391813146
改下build.gradle文件,将里面的compileSdkVersion改为23即可
gradle版本改为1.3.0

3.如果使用:
compile ‘com.google.android.gms:play-services:8.1.0’
出现:No resource found that matches the given name ‘android:Widget.Material.ActionButton’
请用旧版本修复

The last version of Google Play Services now uses appcompat-v7, so u can't use it with actionbarsherlock. You have to use only appcompat-v7 or the previous version of play services:compile 'com.google.android.gms:play-services:7.0.0'

参考:
http://www.07net01.com/2015/07/877878.html
http://stackoverflow.com/questions/18745803/gradle-error-attribute-xxx-has-already-been-defined-in-android-studio

4(终极方案,如果还是不行,那就没得玩了)到官网下载最新的sdk(如果sdk是从就版本更新上来的,问题依旧会出现,建议重新下载最新的)
http://developer.android.com/sdk/index.html

更多相关文章

  1. Android事件处理
  2. Android(安卓)中使用自定义字体的方法
  3. Android(安卓)AlertDialog的基本使用方法
  4. Android之设置横、竖屏方法
  5. Android(安卓)SDK下载和更新失败的解决方法
  6. LayoutInflater.inflate()方法的介绍
  7. Android获取apk的版本及包名等信息
  8. android Aidl 实现进程间通讯
  9. Android编码规范

随机推荐

  1. 组件必知必会|那些年我们使用过的轮子—Fi
  2. 告别祈祷式编程|单元测试在项目里的正确落
  3. 从计算机视觉到人脸识别:一文看懂颜色模型
  4. 宏定义的用法总结
  5. 尚能饭否|技术越来越新,我对老朋友jQuery还
  6. 【粉丝问答19】为啥变量没初始化就用了?那
  7. 22.从0学ARM-移植uboot支持exynos4412
  8. 合约跟单社区系统开发
  9. Python属不属于汇编语言?Python课程
  10. OpenShift 4的身份认证 | 让我们重新认识