问题集锦


1. Release apk打包问题:Lint found fatal errors while assembling a release target.

问题解决:多个activity注册问题,或者部分警告在release中编译不过的问题
android {
    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }
}

2. Android Studio 新版本 3.2打jar包问题,Gradle 版本:classpath 'com.android.tools.build:gradle:3.2.0-alpha14',导致打包路径bundle不存在的情况

问题解决:
在build.gradle  :android{}中添加

        def _BASENAME = "eye_sdk";
        def _VERSION = "_V1.0";
        def _DestinationPath = "build"; //生成jar包的位置
        def zipFile = file('build/intermediates/packaged-classes/release/classes.jar'); //待打包文件位置
       // app/build/intermediates/packaged-classes/debug/
        task deleteBuild(type:Delete){
              delete _DestinationPath + _BASENAME + _VERSION + ".jar"
          }

          task makeJar(type:Jar){
                from zipTree(zipFile)
                 from fileTree(dir:'src/main',includes:['assets/**']) //将assets目录打入jar包
                    baseName = _BASENAME + _VERSION
                    destinationDir = file(_DestinationPath)
          }

             makeJar.dependsOn(deleteBuild, build)

3. More than one file was found with OS independent path 'META-INF/io.netty.versions.properties'

问题解决:
在app.gradle---->android{}中添加
                       packagingOptions {
                              pickFirst 'META-INF/*'
                        }

4. 华为和小米手机log日志开关

  1. 进入工程模式
    有两种方式可以进入工程模式:
    a. 在拨号界面输入“##2846579##
    b. 若是小米4.0系统(MIUI),进入“设置-->全部设置-->原厂设置-->工程模式”
  2. 打开Log
    1. 依次进入“后台设置-->2.LOG设置-->LOG开关”,选择“LOG打开”;返回上一个界面,点击“LOG级别设置”,选择“VREBOSE”
    2. 返回到图1所示二面,选择“6. Dump & Log”,打开开关“打开Dump & Log”
  1. 重启手机

你可能感兴趣的:(问题集锦)