Android 不同机器之间的皮棉差异

Android 不同机器之间的皮棉差异,android,android-studio,gradle,android-gradle-plugin,lint,Android,Android Studio,Gradle,Android Gradle Plugin,Lint,我有一个多模块的android应用程序,它将lint配置为在推送到github之前运行,作为一个预推钩子。我有两台不同的机器(都是Mac),我用它们为这个应用程序编写代码 在一台计算机上,lint标记由于缺少权限而导致的错误。lint正在寻找的权限在另一个模块中声明,并且应用程序按照预期编译、构建和运行,因此正确完成这项工作是毫无疑问的。我也是一个5人团队的一员,没有其他人看到这一点 <?xml version="1.0" encoding="UTF-8"?> <issues

我有一个多模块的android应用程序,它将lint配置为在推送到github之前运行,作为一个预推钩子。我有两台不同的机器(都是Mac),我用它们为这个应用程序编写代码

在一台计算机上,lint标记由于缺少权限而导致的错误。lint正在寻找的权限在另一个模块中声明,并且应用程序按照预期编译、构建和运行,因此正确完成这项工作是毫无疑问的。我也是一个5人团队的一员,没有其他人看到这一点

<?xml version="1.0" encoding="UTF-8"?>
<issues format="5" by="lint 3.6.2">

<issue
    id="MissingPermission"
    severity="Error"
    message="Missing permissions required by TelephonyManager.getNetworkType: android.permission.READ_PHONE_STATE"
    category="Correctness"
    priority="9"
    summary="Missing Permissions"
    explanation="This check scans through your code and libraries and looks at the APIs being used, and checks this against the set of permissions required to access those APIs. If the code using those APIs is called at runtime, then the program will crash.&#xA;&#xA;Furthermore, for permissions that are revocable (with targetSdkVersion 23), client code must also be prepared to handle the calls throwing an exception if the user rejects the request for permission at runtime."
    errorLine1="    return when (telephonyManager.networkType) {"
    errorLine2="                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
    <location
        file="/Users/chris/myproject/dependencies/network/CellularInfoImpl.kt"
        line="47"
        column="18"/>
</issue>

我检查了下面的列表,以确保两台机器运行相同的配置

  • Android Studio版本
  • 这是基于同一分支的同一代码
  • 渐变插件版本
  • 格拉德尔酒店
  • gradle-wrapper.properties
  • Android Studio的正确性检查首选项。(两个上的缺少权限都勾选)
  • lint config.xml
  • lint版本,取自完成gradle任务后的lint报告
我的问题是,还有什么可能导致这种差异?我还应该在哪里尝试解决这个问题


谢谢

简单的解决方案是为缺少的权限添加SuppressWarning注释。这通过停止lint警告来克服问题,但实际上并不能解决问题