java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.gaobo.e5community/com.g

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.gaobo.e5community/com.gaobo.e5community.ui.MainActivity}: java.lang.ClassNotFoundException: com.gaobo.e5community.ui.MainActivity

报这样的错误是

于是猜测是依赖引起的问题,解决办法:
在工程上右键->属性[或者 alter+Enter],进入Java Build Path ,order and export,勾选刚刚引入的jar包,确定,然后clear,重新运行工程,问题解决。

如下图:

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.gaobo.e5community/com.g_第1张图片

你可能感兴趣的:(bug)