无级防守力找到错误(机器人) [英] No Class Def Found Error (android)

查看:122
本文介绍了无级防守力找到错误(机器人)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个应用程序,我可以开始我的发射活动有两个按钮。当这些按钮被点击一个新的活动应打开。然而,随后发生运行时错误。

I am developing an application and I can start my Launcher activity which has two buttons. When any of these buttons is clicked a new activity should be opened. However, then a runtime error occurs.

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Intro extends Activity {

    Button searchBut, fbButton;

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onCreate(final Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        AppSettings.loadLogin(getApplicationContext());
        setContentView(R.layout.intro);
        if (AppSettings.logged) {
            Intent a = new Intent(Intro.this, AllChallengesPager.class);
            a.putExtra("logging", "0");
            startActivity(a);
        }
        searchBut = (Button) findViewById(R.id.button2);
        searchBut.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                Intent a = new Intent(Intro.this, DetailedChallenge.class);
                a.putExtra("logging", "0");
                startActivity(a);
            }
        });
        fbButton = (Button) findViewById(R.id.fbBut);
        fbButton.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                Intent a = new Intent(Intro.this, AllChallengesPager.class);
                a.putExtra("logging", "1");
                startActivity(a);
            }
        });
        AppSettings.loadLogin(getApplicationContext());
    }
}


06-07 11:26:07.776: E/AndroidRuntime(13305): FATAL EXCEPTION: main
06-07 11:26:07.776: E/AndroidRuntime(13305): java.lang.NoClassDefFoundError: com.loopj.android.http.RequestParams
06-07 11:26:07.776: E/AndroidRuntime(13305):    at com.example.challengeZygio.DetailedChallenge.onCreate(DetailedChallenge.java:216)
06-07 11:26:07.776: E/AndroidRuntime(13305):    at android.app.Activity.performCreate(Activity.java:5047)
06-07 11:26:07.776: E/AndroidRuntime(13305):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
06-07 11:26:07.776: E/AndroidRuntime(13305):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2056)
06-07 11:26:07.776: E/AndroidRuntime(13305):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2117)
06-07 11:26:07.776: E/AndroidRuntime(13305):    at android.app.ActivityThread.access$700(ActivityThread.java:134)
06-07 11:26:07.776: E/AndroidRuntime(13305):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1218)
06-07 11:26:07.776: E/AndroidRuntime(13305):    at android.os.Handler.dispatchMessage(Handler.java:99)
06-07 11:26:07.776: E/AndroidRuntime(13305):    at android.os.Looper.loop(Looper.java:137)
06-07 11:26:07.776: E/AndroidRuntime(13305):    at android.app.ActivityThread.main(ActivityThread.java:4867)
06-07 11:26:07.776: E/AndroidRuntime(13305):    at java.lang.reflect.Method.invokeNative(Native Method)
06-07 11:26:07.776: E/AndroidRuntime(13305):    at java.lang.reflect.Method.invoke(Method.java:511)
06-07 11:26:07.776: E/AndroidRuntime(13305):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
06-07 11:26:07.776: E/AndroidRuntime(13305):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
06-07 11:26:07.776: E/AndroidRuntime(13305):    at dalvik.system.NativeStart.main(Native Method)

- 我所有的jar库都放在libs文件夹   - 我已经清理该项目,并重新启动Eclipse进行多次   - 我使用的Eclipse朱诺与所有最新的更新

- All my jar libraries are placed in libs folder - I have cleaned the project and restarted Eclipse for several times - I am using Eclipse Juno with all the newest updates

推荐答案

右键点击你的项目 - >属性 - > Java构建路径 - >订购及放大器;导出

到达这里后,库你所用,选择那些库,并将其移动到列表顶部。即假设你已经使用xyz.jar文件,那么下面将是你的序列。

After reaching here, libraries what you have used, "select" those libraries and move them to top of list. i.e suppose you have used "xyz.jar" file then following will be your sequence.

[X] xyz.jar
[X]安卓x.x
[X] Android的依赖 ......

[x] xyz.jar
[x] Android x.x
[x] Android Dependencies ....

保存更改并清洗后重建项目。

Save changes and rebuild your project after cleaning it.

这篇关于无级防守力找到错误(机器人)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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