• Error:Execution failed for task ':app:packageDebug'. > file == null

解决办法:

在此文件下插入这一段

packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/LGPL2.1'
 }

Android:错误记录,便于查询



  • Error:(63, 61) 错误: 不兼容的类型: Fragment_Home无法转换为Fragment

写BottomNavigationBar的点击跳转Fragment监听事件时出现的错误:

解决办法:

修改监听事件中的红线部分的 导入包 与 方法一致 即可

说明当前用的getFragmentManager()与关联的Fragment文件不统一

import android.support.v4.app.Fragment;

对应getSupportFragment Manager();

import android.app.Fragment;

对应getFragment Manager();


相关文章:

  • 2022-12-23
  • 2021-05-27
  • 2022-12-23
  • 2022-12-23
  • 2022-01-28
  • 2021-11-18
  • 2022-12-23
猜你喜欢
  • 2021-09-01
  • 2022-12-23
  • 2021-12-20
  • 2021-05-21
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案