I'm new to android programming. Here is the issue I'm facing:-
I followed the xml code for toolbar from http://android-developers.blogspot.com/2014/10/appcompat-v21-material-design-for-pre.html and applied into Eclipse. I received this message:
"The following classes could not be instantiated: - android.support.v7.widget.Toolbar (Open Class, Show Error Log) See the Error Log (Window > Show View) for more details."
May I ask any idea how to solve this issue? Thanks!
If you are targeting Android 22, then make your MainActivity extend from AppCompatActivity instead of ActionBarActivity. Then rebuild your gradle project and voila!
The only other possible solution I found is to switch SDK version to 21 in the upper-right (green android guy) of the Preview window.
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