简体   繁体   English

AndEngine GLES2中的编译错误

[英]Compiling errors in AndEngine GLES2

I'm trying to use AndAngine with GLES2, and when I'm trying to compile it I got a lot of errors in AndEngine's sources like 我正在尝试将AndAngine与GLES2一起使用,而当我尝试对其进行编译时,在AndEngine的源代码中出现了很多错误,例如

cannot find symbol variable BuildConfig
cannot find symbol variable HONEYCOMB

and

glDrawElements(int,int,int,java.nio.Buffer) in android.opengl.GLES20 cannot be applied to (int,int,int,int)

And, for example, BuildConfig.java even doesn't exist in /src/org/andengine , as import says! 而且,例如,如import所述,BuildConfig.java甚至不存在于/src/org/andengine

Also, HONEYCOMB , GINGERBREAD , and ICE_CREAM_SANDWICH doesn't exist in Build.VERSION_CODES. 另外, ICE_CREAM_SANDWICH中不存在HONEYCOMBGINGERBREAD和ICE_CREAM_SANDWICH。

I've downloaded latest version of AndEngine from GitHub (branch GLES2), installed SDK's (API levels 7-16) and set minSdkVersion in AndroidManifest to "8". 我已经从GitHub(分支GLES2)下载了最新版本的AndEngine,安装了SDK(API级别为7-16),并将minSdkVersion中的minSdkVersion设置为“ 8”。 Does anyone know what I've missed? 有谁知道我错过了什么?

For your AndEngine project - check the build target 对于您的AndEngine项目-检查构建目标

right click on AndEngine - then left click on Properties - Android - make sure the Build Target is set to 15 or higher 右键单击AndEngine-然后单击“属性”-Android-确保“构建目标”设置为15或更高

Also be sure your development tools are up to date. 另外,请确保您的开发工具是最新的。 If you are using Eclipse - Window | 如果您使用的是Eclipse-Window | Android SDK Manager - make sure the top item "Android SDK Tools" is version 17+ Android SDK Manager-确保顶部的“ Android SDK Tools”版本为17+

Ok, there's solution: 好的,有解决方案:

1) Module SDK must be 15 or higher 1)Module SDK必须为15或更高

2) /gen folder must be in list of source folders 2)/ gen文件夹必须在源文件夹列表中

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

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