08-09 09:19:59.057 25412-25412/? I/art: Late-enabling -Xcheck:jni
08-09 09:19:59.057 25412-25412/? I/art: Reinit property: dalvik.vm.checkjni= false
08-09 09:19:59.190 25412-25412/com.example.tsun.campusnav I/InstantRun: starting instant run server: is main process
08-09 09:19:59.210 25412-25412/com.example.tsun.campusnav I/HwCust: Constructor found for class android.app.HwCustActivityImpl
08-09 09:19:59.228 25412-25412/com.example.tsun.campusnav E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.tsun.campusnav, PID: 25412
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.tsun.campusnav/com.example.tsun.campusnav.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2692)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6531)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference
at android.support.v7.app.AppCompatDelegateImplBase.(AppCompatDelegateImplBase.java:118)
at android.support.v7.app.AppCompatDelegateImplV9.(AppCompatDelegateImplV9.java:152)
at android.support.v7.app.AppCompatDelegateImplV11.(AppCompatDelegateImplV11.java:29)
at android.support.v7.app.AppCompatDelegateImplV14.(AppCompatDelegateImplV14.java:53)
at android.support.v7.app.AppCompatDelegateImplV23.(AppCompatDelegateImplV23.java:31)
at android.support.v7.app.AppCompatDelegateImplN.(AppCompatDelegateImplN.java:31)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:200)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:184)
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:518)
at android.support.v7.app.AppCompatActivity.findViewById(AppCompatActivity.java:189)
at com.example.tsun.campusnav.MainActivity.(MainActivity.java:41)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1083)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2682)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6531)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
08-09 09:19:59.235 25412-25412/com.example.tsun.campusnav I/Process: Sending signal. PID: 25412 SIG: 9
编写了一个百度地图定位的Android程序,结果一点击就直接退出来,各位帮我看看,错误日志如下
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
7条回答 默认 最新
悬赏问题
- ¥15 Python 如何安装 distutils模块
- ¥15 关于#网络#的问题:网络是从楼上引一根网线下来,接了2台傻瓜交换机,也更换了ip还是不行
- ¥15 资源泄露软件闪退怎么解决?
- ¥15 CCF-CSP 2023 第三题 解压缩(50%)
- ¥30 comfyui openpose报错
- ¥20 Wpf Datarid单元格闪烁效果的实现
- ¥15 图像分割、图像边缘提取
- ¥15 sqlserver执行存储过程报错
- ¥100 nuxt、uniapp、ruoyi-vue 相关发布问题
- ¥15 浮窗和全屏应用同时存在,全屏应用输入法无法弹出