zoukankan      html  css  js  c++  java
  • Unable to instantiate activity ComponentInfo或java.lang.ClassNotFoundException: com.ibright.herolegen

    不知道怎么回事,在libs中添加了jar包后,无法给jar包附加上源码,于是采取以下措施:
    删除自动生成的依赖:
    在Android Dependences目录上右击->Build Path ->Remove from Build Path
    然后往libs中拖入jar包,然后添加jar的引用,这样,就可以给jar包附上源码了。
    但是运行程序的时候,报以下的错误:

    10-16 22:11:54.549: E/AndroidRuntime(2167): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.ibright.herolegend/com.ibright.herolegend.launcher.HeroLegendLauncher}: java.lang.ClassNotFoundException: com.ibright.herolegend.launcher.HeroLegendLauncher in loader dalvik.system.PathClassLoader[/data/app/com.ibright.herolegend-1.apk]


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

  • 相关阅读:
    UVa LA 2965
    UVa LA 3695
    UVa LA 3029 City Game 状态拆分,最大子矩阵O(n2) 难度:2
    Uva LA 3177
    Uva LA 3902
    Uva 11520
    UVa Live 3635
    python学习笔记-day05 字典
    python学习笔记-day04 元组
    python学习笔记 day04 列表增删改查
  • 原文地址:https://www.cnblogs.com/pangblog/p/3310504.html
Copyright © 2011-2022 走看看