Mark McCabe
Mark McCabe

Reputation: 53

How do I change the class to public?

How do I change the class to public and eliminate this message?

Description Resource    Path    Location    Type
This class should be public (android.support.v7.internal.widget.ActionBarView.HomeView) BootleJFL       line 1  Android Lint Problem

Upvotes: 2

Views: 1966

Answers (3)

zheek
zheek

Reputation: 752

If you are using Eclipse:

Project > Clean > OK
Or Try:

Preferences -> Android Lint Preferences
Search for Instantiatable and set as Warning.

http://developer.android.com/tools/debugging/improving-w-lint.html

This worked for me.

Upvotes: 0

VonC
VonC

Reputation: 1329642

That would be an Android Lint Checks

Instantiatable

Summary: Ensures that classes registered in the manifest file are instantiatable

  • Priority: 6 / 10
  • Severity: Warning
  • Category: Correctness

Activities, services, broadcast receivers etc. registered in the manifest file must be "instiantable" by the system, which means that the class must be public, it must have an empty public constructor, and if it's an inner class, it must be a static inner class.

Make sure its setting is set to Warning (or to Ignore) for your v7-appcompat library.

Upvotes: 3

Rahul Tripathi
Rahul Tripathi

Reputation: 172628

You can restart Eclipse and it will be fine. Or you may try to Go to Window->Preferences->Android Now find your SDK location (most likely: C:\Program Files (x86)\Android\android-sdk-windows). Click apply.

Upvotes: 0

Related Questions