老师,我的代码没有错误提示,但是程序运行不了:

来源:7-1 注册UI及验证逻辑实现

西红柿o猴子

2019-05-05

05-05 05:42:15.603 31422-31422/com.example.samsung.acidhouse E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.samsung.acidhouse, PID: 31422
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.samsung.acidhouse/com.example.samsung.acidhouse.ExampleActivity}: java.lang.IllegalStateException: View ‘edit_sign_up_name’ with ID 2131624065 for field ‘mName’ was of the wrong type. See cause for more info.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access800(ActivityThread.java:151)atandroid.app.ActivityThread800(ActivityThread.java:151) at android.app.ActivityThread800(ActivityThread.java:151)atandroid.app.ActivityThreadH.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.IllegalStateException: View ‘edit_sign_up_name’ with ID 2131624065 for field ‘mName’ was of the wrong type. See cause for more info.
at butterknife.internal.Utils.castView(Utils.java:113)
at butterknife.internal.Utils.findRequiredViewAsType(Utils.java:105)
at com.example.acid.ec.sign.SignUpDelegate_ViewBinding.(SignUpDelegate_ViewBinding.java:25)
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)

写回答

1回答

傅猿猿

2019-05-05

两个原因,第1个原因程序实在太老了,可现在的新版本,基本上是不兼容的了,我马上会有新课,第2个原因呢,你看一下你的API配置的地方,嗯,你可以用我们的现场环境

0
1
慕粉3798327
老师您好,如果我们的环境是com.android.tools.build:gradle:3.3.1,是不是就无法将这个项目进行下去了呢
2019-12-25
共1条回复

Android通用框架设计与完整电商App开发

从第一行代码开始教你,通用且一键式配置的框架设计并轻松实现完整电商App

2028 学习 · 1182 问题

查看课程