eclipse安装LibGDX后的bug [英] bugs in eclipse after installing LibGDX

查看:247
本文介绍了eclipse安装LibGDX后的bug的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有在eclipse中的项目,我只是按照这个方法中的步骤:



在Eclipse中:


  1. 打开Android SDK管理器:窗口 - > Android SDK管理器

  2. 标记如果没有安装 SDK Plataform 适用于Android 4.4.2(API 19)并进行安装。

  3. 最后使用文件 - >导入 - >常规 - >现有项目导入项目进入工作区


i had no project in eclipse, and i just followed the steps in this toturial: https://www.youtube.com/watch?v=S9fs1PVTyUc&src_vid=6i78aqugqds&feature=iv&annotation_id=annotation_4141831685

and it opened for me a few projects named: project, project-android, project-core, project-desktop, project-ios.

and the project-android had an error. here is the code:

package com.ak01.projext.android;*

import android.os.Bundle;**

import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import com.ak01.projext.Projec;

public class AndroidLauncher extends AndroidApplication {***
    @Override
    protected void onCreate (Bundle savedInstanceState) {****
        super.onCreate(savedInstanceState);
        AndroidApplicationConfiguration config = new 
        AndroidApplicationConfiguration();
        initialize(new Project(), config);
    }
}

but it has a few errors although i didn't touch it yet(the number of *'s matches to the line)

*The type android.os.Handler cannot be resolved. It is indirectly referenced from required .class files

**The import android.os.Bundle cannot be resolved

***Multiple markers at this line

-The type android.app.Activity cannot be resolved. It is indirectly referenced from required .class files

-The hierarchy of the type AndroidLauncher is inconsistent

****Bundle cannot be resolved to a type

解决方案

You can try to use the advanced option to check eclipse as @Tuss said in a comment. Also note that you need the version 19 of Android SDK (it isn't valid the last version at the time of writing this, API 23).

When creating the Libgdx project:

  1. In Libgdx Project Generator open Advanced options.
  2. Check Eclipse.
  3. Generate your project.

In Eclipse:

  1. Open Android SDK Manager: Window -> Android SDK Manager.
  2. Mark if it isn't installed the SDK Plataform for Android 4.4.2 (API 19) and install it.
  3. Finally import the projects with File -> Import -> General -> Existing Projects into Workspace.

这篇关于eclipse安装LibGDX后的bug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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