You need to use a Theme.AppCompat theme (or descendant) with this activity.

java.lang.RuntimeException: Unable to start activity ComponentInfo{ezviz.ezopensdk/com.videogo.LoginWithPhoneActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2339)
                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413)
                                                                     at android.app.ActivityThread.access$800(ActivityThread.java:155)
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                     at android.os.Looper.loop(Looper.java:135)
                                                                     at android.app.ActivityThread.main(ActivityThread.java:5343)
                                                                     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:905)
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
                                                                  Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
                                                                     at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:343)
                                                                     at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:312)
                                                                     at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:277)
                                                                     at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
                                                                     at com.videogo.LoginWithPhoneActivity.onCreate(LoginWithPhoneActivity.java:24)
                                                                     at android.app.Activity.performCreate(Activity.java:6010)
                                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1129)
                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413) 
                                                                     at android.app.ActivityThread.access$800(ActivityThread.java:155) 
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317) 
                                                                     at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                     at android.os.Looper.loop(Looper.java:135) 
                                                                     at android.app.ActivityThread.main(ActivityThread.java:5343) 
                                                                     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:905) 

                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) 


解决办法:添加如下一行到清单文件中这个activity 里面

android:theme="@style/Theme.AppCompat"

<activity android:name="com.videogo.LoginWithPhoneActivity"
    android:theme="@style/Theme.AppCompat"></activity>



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值