When trying to view the Graphical Layout view I am getting the following error:
The following classes could not be found - EditText (Change to android.widget.EditText, Fix Build Path, Edit XML)
The app works fine and I can edit the XML without any problems. I just can't load the graphical layout view anymore. In the Main.java file there are no problems or errors importing the EditText widget from the Android library.
I'm using Eclipse Indigo Service Release 2. Got all the recent updates.
I'm also using the latest Android SDK Tools 20.0.1
Here is the source. I've tried the option to Source > Cleanup Document and Format just to make sure the XML was correct.
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_marginTop="63dp" android:text="@string/button1" /> <EditText android:id="@+id/editText1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:layout_marginTop="16dp" android:ems="10" android:inputType="" > <requestFocus /> </EditText> </RelativeLayout>
I managed to fix the problem.
I had to change
android:inputType="" to android:inputType="text"
The Graphical Layout view now works again.
this is because if you are using api 4.4W which is recently released for android wear
and Android wear doesnot support edittext
http://developer.android.com/training/building-wearables.html
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