1.错误提示:Error:Could not delete path 'C:\Users\Administrator.android\build-cache\4bcb944bb1b0acd2e173376f1b2cd7aaf97ca50c\output\aidl\android\support\v4'.

解决方式:手动删除 4bcb944bb1b0acd2e173376f1b2cd7aaf97ca50c 目录即可。
2.错误提示:Unable to create call adapter for io.reactivex。
原因:Retrofit暂时不支持RxJava2的适配器。
解决方式:导入新包

implementation 'com.squareup.retrofit2:adapter-rxjava2:latest.version'  addCallAdapterFactory(RxJava2CallAdapterFactory.create())

3.错误提示:retrofit2.adapter.rxjava2.HttpException: HTTP 404 Not Found
原因:请求的完整API中有特殊字符,不能识别。

 Process: com.huawei.mycenter, PID: 25953   java.lang.IllegalArgumentException: Scrapped or attached views may not be recycled. isScrap:false isAttached:true at   android.support.v7.widget.RecyclerView$Recycler.recycleViewHolderInternal(RecyclerView.java:5778) at   android.support.v7.widget.RecyclerView$Recycler.quickRecycleScrapView(RecyclerView.java:5885) at   

原因:RecyclerView在进行切换数据之后,要调用 notifyDataSetChanged()方法。

5.ScrollView 内部子布局MATCH_PARENT却无法填充满屏幕。
android:fillViewport="true"

6.获取activity和屏幕的高度。
activity:

DisplayMetrics dm = context.getResources().getDisplayMetrics(); return dm.heightPixels;

屏幕显示的高度:

WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);if (wm == null) {  return context.getResources().getDisplayMetrics().heightPixels; } Point point = new Point();wm.getDefaultDisplay().getRealSize(point); return point.y;

一直更新。。。。。。

更多相关文章

  1. android唤醒屏幕/保持屏幕唤醒
  2. Android屏幕休眠和唤醒
  3. Android 屏幕截图 代码
  4. Android触控屏幕Gesture(GestureDetector和SimpleOnGestureListe
  5. Android保持屏幕常亮的方法总结
  6. android获取屏幕信息
  7. android 获取屏幕的长和宽
  8. Android获取StatusBa有效高度

随机推荐

  1. OpenCV:模板匹配。
  2. OpenCV:人脸检测。
  3. 分布式爬虫的部署之Scrapyd批量部署
  4. 【机器学习笔记】:解读正则化,LASSO回归,岭
  5. 手把手教你用Bokeh进行可视化数据分析(附
  6. 分布式爬虫的部署之Gerapy分布式管理
  7. Scrapy框架的使用之Scrapy爬取新浪微博
  8. 分布式爬虫原理之分布式爬虫原理
  9. OpenCV:图像检索。
  10. 分布式爬虫原理之Scrapy分布式实现