I am following the tutorial on this(http://tools.android.com/tips/lint-custom-rules) page. I am stuck at the step:
lint --show MyId
I get the following error message, any ideas?
Could not load custom rule jar file /Users/me/.android/lint/CustomLintRule.jar java.lang.NoSuchMethodError: com.android.tools.lint.detector.api.Issue.create(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/android/tools/lint/detector/api/Category;ILcom/android/tools/lint/detector/api/Severity;Ljava/lang/Class;Ljava/util/EnumSet;)Lcom/android/tools/lint/detector/api/Issue; at googleio.demo.MyDetector.(MyDetector.java:16) at googleio.demo.MyIssueRegistry.getIssues(MyIssueRegistry.java:15) at com.android.tools.lint.client.api.JarFileIssueRegistry.(JarFileIssueRegistry.java:93) at com.android.tools.lint.client.api.JarFileIssueRegistry.get(JarFileIssueRegistry.java:70) at com.android.tools.lint.client.api.LintClient.addCustomLintRules(LintClient.java:911) at com.android.tools.lint.Main.getGlobalRegistry(Main.java:642) at com.android.tools.lint.Main.run(Main.java:204) at com.android.tools.lint.Main.main(Main.java:113) Invalid id or category "MyId".
Tip: You can manage the lint checking feature for your Java, Kotlin, or XML source files in the Default Preferences dialog. Select File > Other Settings > Default Settings, and then in the left pane of the Default Preferences dialog, select Editor > Inspections.
GitHub - nebula-plugins/gradle-lint-plugin: A pluggable and configurable linter tool for identifying and reporting on patterns of misuse or deprecations in Gradle scripts.
I was same too.
So I downloaded adt-bundle and I tried with "lint-api.jar" in it and the error was gone.
I think "lint-api.jar" included in AndroidStudio is something wrong...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With