Yog*_*ity 5 regex android intellij-idea gradle android-studio
将Android Studio升级到后,将2.1.2旧项目导入到我的代码中时,就会出现警告。警告是:
Instance field name doesn't match regex '[a-z]+'
Local variable name doesn't match regex '[a-z]+'
Instance field access is not qualified with 'this'
Run Code Online (Sandbox Code Playgroud)
这是屏幕截图。
如果我将同一类文件复制到另一个新项目,则不会出现警告。仅旧项目显示这些警告。这是我的build.gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.example.app"
minSdkVersion 10
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:24.1.0'
compile 'com.android.support:design:24.1.0'
androidTestCompile 'junit:junit:4.12'
}
Run Code Online (Sandbox Code Playgroud)
我尝试过File menu -> Invalidate caches / Restart,但没有帮助。我想解决问题而不是忽略警告。任何帮助深表感谢。谢谢。
您的检查配置文件已更改。您可以通过这种方式还原它。
要么
从列表中禁用所有不需要的检查。
要么
创建您自己的检查员资料。
| 归档时间: |
|
| 查看次数: |
1029 次 |
| 最近记录: |