[英]Android Studio NullPointerException (no error message) after grey screen/restart
I was programming in Android Studio, on MAC OS X macOS Sierra. 我当时在Android Studio上的MAC OS X macOS Sierra上编程。
I was debugging code on one emulator, then I started next emulator with different phone. 我在一个模拟器上调试代码,然后用其他手机启动下一个模拟器。 Then accidentally laptop restarted (with the grey screen https://i.kinja-img.com/gawker-media/image/upload/s--HPvl05ih--/c_scale,f_auto,fl_progressive,q_80,w_800/18mfougmh04injpg.jpg ).
然后笔记本电脑意外重启(灰屏https://i.kinja-img.com/gawker-media/image/upload/s--HPvl05ih--/c_scale,f_auto,fl_progressive,q_80,w_800/18mfougmh04injpg.jpg ) 。
After boot everything come back, Android Studio too. 启动后,一切都会恢复,Android Studio也是如此。 But I can't debug my apps.
但是我无法调试我的应用程序。 I have
我有
Error:java.lang.NullPointerException (no error message)
This happening everytime I try to run my app. 每当我尝试运行我的应用程序时都会发生这种情况。 It is on my company project, from git.
它在我公司的项目中,来自git。 I tried different versions of code.
我尝试了不同版本的代码。
I tried also (with chronology): 我也尝试过(按时间顺序):
reinstall Android Studio 重新安装Android Studio
reinstall SDK, Virtual Devices 重新安装SDK,虚拟设备
reinstall Android Studio after completly delete it from Mac, using terminal ( How to completely uninstall Android Studio? ) 使用终端从Mac完全删除Android Studio后重新安装它( 如何完全卸载Android Studio? )
reinstall Java (uninstall with the tip from Java webpage ( https://www.java.com/en/download/help/mac_uninstall_java.xml ) 重新安装Java(通过Java网页( https://www.java.com/en/download/help/mac_uninstall_java.xml )中的提示进行卸载)
I don't know what I can do next besides reinstalling OS. 除了重新安装操作系统外,我不知道下一步该怎么做。
Thanks 谢谢
Okay. 好的。
After that post I also tried cleaning cache, logs and again reinstall Java JDK. 在那篇文章之后,我还尝试清理缓存,日志并再次重新安装Java JDK。 Nothing helped.
没有任何帮助。
Unfortunately the only solution which helped - format and reinstall system. 不幸的是,唯一有帮助的解决方案-格式化并重新安装系统。
在android studio中尝试File-> Invalidate caches / Restart...。
您必须将“ .gradle”文件夹删除到根项目中,然后重新启动android studio。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.