简体   繁体   English

无法使用intellij IDEA 12.04 CE编译引用AndEngine GLES2的android应用程序

[英]Cannot compile an android application referencing AndEngine GLES2 with intellij IDEA 12.04 CE

I've struggled with referencing errors to AndEngine GLES2 for hours. 我一直在努力将错误引用给AndEngine GLES2几个小时。 I've followed this guide, http://jimmaru.wordpress.com/2012/04/23/setting-up-andengine-gles2-0/ and somehow I could compile the AndEngine (at least, there are no errors, though there are 33 warnings), but when I refer to it from an android application which I downloaded from https://github.com/nicolasgramlich/AndEngineExamples produces bunch of errors saying "java: package org.andengine.engine.camera does not exist" or such (the messages are in Japanese, so it might be slightly different) Please see the attached picture. 我遵循了该指南,网址为http://jimmaru.wordpress.com/2012/04/23/setting-up-andengine-gles2-0/,并以某种方式可以编译AndEngine(尽管如此,至少没有错误)有33条警告),但是当我从我从https://github.com/nicolasgramlich/AndEngineExamples下载的android应用程序中引用该警告时,会产生一堆错误,提示“ java:org.andengine.engine.camera软件包不存在或类似内容(这些消息是日语的,因此可能会略有不同),请参阅所附图片。

在此处输入图片说明

What I did so far 我到目前为止所做的
AndEngine 引擎

  • Project Structure - Project Settings - Project - Change Project SDK to "Android 4.2 Platform" 项目结构-项目设置-项目-将项目SDK更改为“ Android 4.2平台”
  • Project Structure - Project Settings - Modules - Dependencies - Change Module SDK to "Android 4.2 Platform" 项目结构-项目设置-模块-依赖关系-将模块SDK更改为“ Android 4.2平台”
  • Project Structure - Project Settings - Facets - Check "Library module" 项目结构-项目设置-方面-检查“库模块”

AndEngineExample AndEngineExample

  • Project Structure - Project Settings - Project - Change Project SDK to "Android 4.2 Platform" 项目结构-项目设置-项目-将项目SDK更改为“ Android 4.2平台”
  • Project Structure - Project Settings - Libraries - Add "AndEngine" (Classes and Sources) 项目结构-项目设置-库-添加“ AndEngine”(类和源)
  • Project Structure - Project Settings - Modules - Dependencies - Change Module SDK to "Android 4.2 Platform" 项目结构-项目设置-模块-依赖关系-将模块SDK更改为“ Android 4.2平台”

My environment is the following. 我的环境如下。
Windows 7 Home Premium 64bit Windows 7家庭高级版64位
IntelliJ IDEA 12.04 CE IntelliJ IDEA 12.04 CE
java version 1.7.0 Java版本1.7.0

I'm pretty much new to Java and Android world, so any help would be appreciated! 我对Java和Android领域非常陌生,因此不胜感激!

AndEngine should be configured as a module (with library module option enabled in Android facet ), not as a plain Java library. AndEngine应该配置为模块 (在Android facet启用了库模块选项),而不应配置为纯Java库。

See the related question: Add facebook SDK to IntelliJ Android project? 请参阅相关问题: 将Facebook SDK添加到IntelliJ Android项目?

You need to follow the tutorial on mybringback.com it will explain in depth of what is going on and help fix those errors. 您需要按照mybringback.com上的教程进行操作,它将详细解释正在发生的事情并帮助修复这些错误。 mybringback.com First off there is a difference if your using GLES1 and GLES2. mybringback.com首先,使用GLES1和GLES2会有所不同。 The JAVA compiler needs to be placed at 16. The library module must be imported and referenced as such or they can't be used. JAVA编译器必须放置在16。库模块必须以这种方式导入和引用,否则将无法使用。 He will put it into really broken down vids. 他会将其分解为真正分解的视频。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM