How to remove the error message: 'unused import statement' in Android Studio?

I am working in Android Studio, and while importing these packages

import android.util.Log;
import com.mesibo.api.Mesibo;

the following error message occurs:

unused import statement import android.util.Log; import com.mesibo.api.Mesibo;

Any ideas on how to resolve this error message? Your help would be greatly appreciated!

Upvotes: 2

Views: 1650

Answers (2)

What I did was that I imported the git repository file from the official mesibo page, with the git tool, opened the sample project and recompiled the project, add the json file from firebase and ready to compile the app without probes thanks for the answer and I share my experience about this error

Upvotes: 0

Nathan
Nathan

Reputation: 8141

This is a warning message not an error message.

This message indicates that a library you've imported is potentially not being used within your current file as indicated by the grey color associated with said import. With that being said, it isn't harmful for there to be an unused import statement. Although, if you truly aren't using the built-in Android logger or your custom API then feel free to delete the import statements.

This warning message likely occurred because of the Optimize imports on the fly option selected within your Android Studio IDE. For more information check out the JetBrains documentation for additional IDE settings.

Hopefully that helps!

Upvotes: 1

Related Questions