java – android. support. v7. widget. GridLayout cannot be instantiated
I'm trying to use GridLayout in my project, but ideally I use the Android support library, so I can locate a lower version of the API When I drag GridLayout into the graphic layout designer, a message will pop up asking me if I need a compatibility Library of API version over the age of 14 and whether I want to install this library I clicked "Install" and asked eclipse to do its work, but an error occurred in the eclipse graphical layout designer:
The following classes Could not be instantiated: - android.support.v7.widget.GridLayout See the Error Log ( Window > Show View) for more details."
(this is screenshot)
From the error log, Android support. v7. widget. GridLayout cannot be instantiated
Solution
Make sure that the GridLayout Library in the project is added as a library
Try importing the GridLayout library project as follows
File - > Import - > enter the existing Android code into the workspace, and specify Android SDK - [path] / Extras / Android / support / V7 / GridLayout
Make sure the GridLayout project is imported as an Android library project and copied into the workspace
After importing a library project, add it to the project as a library, as follows:
Right click your project – > properties – > java build path – > order and export, check all options