Android Studio - Inspect Code - Exclude generated files

前端 未结 4 1861
梦如初夏
梦如初夏 2021-02-20 03:24

Is there any way, how to exclude android generated files (or manually specify excluded folders), from Analyze -> Inspect Code ?

4条回答
  •  温柔的废话
    2021-02-20 04:22

    Use a custom scope. After clicking Analyze > Inspect Code, from the Specify Inspection Scope dialog, click "..." after "Custom scope". Define a new scope. Recursively include Android, app, and whatever else is important. Then recursively exclude folders you don't want.

    I like to put my generated code in the build folder and exclude it. (To get code in the build folder to be included in the build, include it in app.gradle in android/sourceSets/main/java.srcDirs.)

提交回复
热议问题