android - java.lang.ClassCastException: Help me find whats wrong please -
Ok here is the XML code I try to fix I've been in for more than an hour, I do not know what's going on. I get an error on the last line of code: Edit: for some reason i XML code I can not add .. The stacktrace here: After This means that you In or if you see a ph0ne = (EditText) findViewById (R.id.testphone);
increases the MyActivity activity of the public class {@ Override Creates the Protected Zero (Bundled Saved Instance) {super.onCreate (savedInstanceState); SetContentView (R.layout.activity_my); BTN1 = Find (VBIID) (RID Button Go Tunber); BTN2 = (VBIID (R.D.Test 3 button); LEHEM = (linear layout) Find VVBIID (R.D.L.H.M.D.D.); LayAddNumer = (LinearLayout) findViewById (R.id.test3LAY); Ph0ne = (EditText) findViewById (R.id.testphone); }}
java.lang.RuntimeException: Unable Initial Activity ComponentInfo {com.spiratessgmail.myapplication / com.spiratessgmail.myapplication.MyActivity}: java.lang.ClassCastException: android.widget.LinearLayout can not be inserted for Android. Widget.EditText atroid.app.ActivityThread.performLaunchActivity (ActivityTrade. Java: 2195) android.app.ActivityThread $ H.handleMessage at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java 2245) android.app.ActivityThread.access $ 800 (ActivityThread.java:135) at (ActivityThread.java: 1196) android.app.ActivityThread.main on android.os.Handler.dispatchMessage (Handler.java:102) android.os.Looper.loop (Looper.java: 136) on (ActivityThread.java T.01017) on Java. Lang.reflect.Method.invokeNative (native resident method) at java.lang.reflect.Method.invoke com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (Method.java: 15) (ZygoteInit.java:779) But on the reason of the (omnibox.index.index.main) dalvik.system.NativeStart.main (native resident method) (ZygoteInit.java lesson9): java.lang.ClassCastException: android.widget.LinearLayout android Can not be molded for Com.spiratessgmail.myApplication.MyActivity.onCreate (MyActivity.java:33) android.app.Activity.performCreate (Activity.java:5231) android.app.Instrumentation.callActivityOnCreate at on widget.EditText (Instrumentation.java:1087) Android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2159) One A One One One One One One One One Android.app.ActivityThread.handleLaunchActivity (ActivityThread.java 2245) One A One One A One and one in one android.app.ActivityThread.access $ 800 (ActivityThread.java:135) One A One One One One One Android.app.ActivityThread $ H.handleMessage One (ActivityThread.java:1196) Â on Android.os.Handler.dispatchMessage (a. Â Â a one android.os.Looper.loop (Looper.java:136) a a a a a a a a a A one on one android.app.ActivityThread.main (ActivityThread.java T.01017) One A One One One One One One One One Java.lang.reflect.Method.invokeNative (Native Method) One A One One One on one a one a one (at Method.java: 515) at java.lang.reflect.Method.invoke one a one one one one one one one one com.android.internal.os.zygoteinit $ MethodAndArgsCaller.run On (ZygoteInit.java:779) one a one one one one one one one one one a com. Android.internal.os.ZygoteInit.main (ZygoteInit.java lesson9) one at one one one one one one one one at one dalvik.system.NitalStart.main (native resident method) < / Div>
android.widget.LinearLayout android.widget.EditText
ph0ne = (EditText) should change Duँdenwubiaiaidi (R.id.testphone);
ph0ne = (linear Lyaut) findViewById (R.id.testphone);
EditText should be, you have to change the view with the ID code code (which is <> LinearLayout ) is a
EditText
Comments
Post a Comment