Android Studio:“错误:找不到或加载主类" [英] Android Studio : "Error: Could not find or load main class"

查看:278
本文介绍了Android Studio:“错误:找不到或加载主类"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我已经使用Android Studio大约两周了,没有任何问题.但是最近,当我尝试打开Android Studio时开始出现此错误.我使用Ubuntu 16.10.

I've been using Android Studio for around a couple of weeks without any issues so far. But recently , I've started getting this error when I try to open Android Studio. I use Ubuntu 16.10.

Tools/android-studio/bin$ ./studio.sh
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
Error: Could not find or load main class #

我在做什么错?我已经尝试过重新提取android studio.还是一样.

What am I doing wrong ? I've tried re-extracting android studio again. Still the same.

推荐答案

您的某些Android Studio配置文件可能被弄乱了.要解决此问题,请删除.android .AndroidStudio(可能具有版本号,例如.AndroidStudio2.3/). 为了节省初学者的时间,他们可能会添加目录,并可以使用

Some of your android studio configuration files are probably messed up. To fix this delete .android .AndroidStudio (might have a version number eg. .AndroidStudio2.3/). To save time for beginners, they maybe directories and can to deleted using

rm -rf ~/.AndroidStudio*
rm -rf ~/.android*

PS:使用版本控制为您使用的每个配置文件备份都是有意义的.节省我的时间和精力. 基于此

PS: It makes sense to have a backup of every configuration file your use using a version control. saves me time and energy. Based on this

这篇关于Android Studio:“错误:找不到或加载主类"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆