cja
cja

Reputation: 10016

How to add a compiler warning in Android Studio?

In C# in Visual Studio I can do this with

#warning The following method needs refactoring for clarity

What's the Android Studio equivalent?

Upvotes: 1

Views: 1693

Answers (1)

Palejandro
Palejandro

Reputation: 2341

try something like this: @SuppressWarnings("your message") for example

@SuppressWarnings("your message") 
myMethod(){
body;
}

also, look at this question:

How to intentionally cause a custom java compiler warning message?

Upvotes: 1

Related Questions