Android Studio 关闭Lint检测

在高版本的 Android studio 中新建项目,在 Manifest.xml 文件中会有黄色警告:

App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter.

这个是 Google search 功能,卵用没有,需要在gradle文件中关闭。

找到app的gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.ghpym.study"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        disable 'GoogleAppIndexingWarning'
        baseline file("lint-baseline.xml") // your choice of filename/path here
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

上面代码已经添加lintOptions

lintOptions {
        disable 'GoogleAppIndexingWarning'
        baseline file("lint-baseline.xml") // your choice of filename/path here
    }

 

上一篇 IObit Smart Defrag 去广告
下一篇 OD修改软件文本字符串内容
目录
applek

applek管理员

个人说明在个人中心里面设置

本月创作热力图

少
多
最新评论
卢温白
卢温白
10月10日
咨询 AeroCore 主题: 1、能否制作两套独立归档模板,分别分配给两个父栏目,各自下属全部子分类?一套分类网格一行 10 个卡片,另一套分类列表一行仅显
评论于关于本站
卢温白
卢温白
10月10日
咨询 CoreNext 主题: 1、能否制作两套独立归档模板,分别分配给两个父栏目,各自下属全部子分类?一套分类网格一行 10 个卡片,另一套分类列表一行仅显
评论于留言建议
jo
jo
10月9日
为什么后台不能更新主题,提示已经最新版。当前版本1.4.9,我看网站显示版本都到1.5.2了
Tom
Tom
10月8日
AeroCore 的按需加载确实做得好,Vite 构建后的首屏比之前 CoreNext 快不少。不过上面 Mike 说的进度条问题我这边也能稳定复现:从留言页点
评论于留言建议
Shaw
Shaw
10月2日
需要邀请码注册功能,有了马上下单