Skip to content
用于检测Android项目layout文件中控件类是否存在,避免因控件类不存在,带来线上ClassNotFoundException问题!
Kotlin Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle init Dec 10, 2019
res-monitor
sample
.gitignore filter manifest declear classes Dec 10, 2019
LICENSE Initial commit Dec 10, 2019
README.md
README.zh-CN.md
build.gradle
gradle.properties
gradlew init Dec 10, 2019
gradlew.bat
settings.gradle

README.md

ResMonitor

license Release Version

A repository for android application module to detect if layout file contain non-existent views.

README 中文版

Getting Started

1. Add dependencies

Add ResMonitor plugin in root build.gradle,and do not forget add maven { url 'https://jitpack.io' } too.

buildscript {
    ext.resmonitor_version='0.1.1'
    repositories {
        maven { url 'https://jitpack.io' } //add this line
        google()
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath "com.github.emile2013:ResMonitor:$resmonitor_version" //add this line
    }
}

allprojects {
    repositories {
      maven { url 'https://jitpack.io' }  //add this line
      google()
      mavenCentral()
      jcenter()
    }
}

apply com.github.emile2013.res-monitor plugin in module build.gradle file

apply plugin: 'com.android.application'
apply plugin: 'com.github.emile2013.res-monitor' // add this line

2. Run task

./gradlew checkReleaseRes

something output on  console like:

Execution failed for task ':app:checkReleaseRes'.
> java.lang.Exception: androidx.core.view.ViewPager not exist !! but declare at:
  # Referenced at /ResMonitor/sample/app/src/main/res/layout/content_main.xml:11

Samples

Tips

This program uses aapt_rule.txt and javassist to handle functions, so must set minifyEnabled=true in build.gradle file.

License

ResMonitor is licensed under the BSD 3-Clause License.

You can’t perform that action at this time.