Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 使用Ant构建和签署包含APK的库时发生NoClassDefFoundError_Android_Ant_Jar - Fatal编程技术网

Android 使用Ant构建和签署包含APK的库时发生NoClassDefFoundError

Android 使用Ant构建和签署包含APK的库时发生NoClassDefFoundError,android,ant,jar,Android,Ant,Jar,我在启动一个已经通过Ant构建和签署的APK时遇到了一个问题 我的项目包括一个图书馆。这个图书馆也是一个图书馆 我的项目构建得很好,但当我启动它时,应用程序崩溃并出现NoClassDefFoundError 我认为可以通过将我的库(这里是库“SEMobile”)“SEMobile.jar”添加到项目的“libs”文件夹中来避免此错误,但结果完全相同: 它的构建和标志都很好,但当我启动应用程序时,它仍然会因NoClassDefFoundError而崩溃 崩溃的堆栈跟踪是: java.lang.No

我在启动一个已经通过Ant构建和签署的APK时遇到了一个问题

我的项目包括一个图书馆。这个图书馆也是一个图书馆

我的项目构建得很好,但当我启动它时,应用程序崩溃并出现NoClassDefFoundError

我认为可以通过将我的库(这里是库“SEMobile”)“SEMobile.jar”添加到项目的“libs”文件夹中来避免此错误,但结果完全相同:

它的构建和标志都很好,但当我启动应用程序时,它仍然会因NoClassDefFoundError而崩溃

崩溃的堆栈跟踪是:

java.lang.NoClassDefFoundError: fr.turbosa.turbosuite.releves.ReleveFragment
        at fr.turbosa.turbosuite.demarrage.FragmentMain.onCreate(FragmentMain.java:94)
        at android.app.Activity.performCreate(Activity.java:5104)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2258)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2354)
        at android.app.ActivityThread.access$600(ActivityThread.java:150)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)

我的项目使用ActionBarSherlock,并作为库项目添加。活动
ReleveFragment
SherlockFragment
的扩展。我是否也应该将ActionBarSherlock jar文件添加到我的libs文件夹中?

问题是由于我的片段使用了一个外部库(定义文件夹中的jar文件)


将此jar文件设置到“libs”库中纠正了该问题。

尝试
清除
重新启动eclipse
。希望它能起作用。