由於晚上,我試圖建立andEngine與Android工作室,AndEngine安裝了Android錯誤
我下載andEngine從GitHub
https://github.com/nicolasgramlich/AndEngine
GLES-中心定位..我從SDK安裝NDK經理(在adroid工作室)
然後,我創建了android工作室(空白活動)的新項目,然後我去了項目結構和點擊+左側,並添加了「導入Eclipse ADT項目」 - >和選擇下載andEngine(從GitHub),並完成
然後我得到了錯誤「NDK depcrecated」通過添加gradle.properties下面一行「android.useDeprecatedNdk =真」,這是解決
然後嘗試SYN再次,然後我得到了下面的錯誤,我不知道現在要做什麼..請幫我解決它..
信息:Gradle任務[:app:generateDebugSources,:app:generateDebugAndroidTestSources,:andEngine:generateDebugSources,: andEngine:generateDebugAndroidTestSources] :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :應用程序:checkDebugManifest :andEngine:預生成UP-TO-DATE :andEngine:preReleaseBuild UP-TO-DATE :andEngine:compileReleaseNdk C:\用戶\ Amul \ AndroidStudioProjects \ MyApplication2 \ andEngine \ SRC \主\ JNI \ src \ GLES20Fix.c:在函數'Java_org_andengine_opengl_GLES20Fix_glVertexAttribPointer'中: glVertexAttribPointer(index,size,type,normalized,stride,(void *)offset); ^ C:\用戶\ Amul \ AndroidStudioProjects \ MyApplication2 \ andEngine \ SRC \主\ JNI \ SRC \ GLES20Fix.c:在函數 'Java_org_andengine_opengl_GLES20Fix_glDrawElements': glDrawElements(模式,計數,類型,(無效*)偏移量);^ C:\ Users \ Amul \ AndroidStudioProjects \ MyApplication2 \ andEngine \ build \ intermediates \ ndk \ release \ obj/local/arm64-v8a/objs/andengine_shared/C_ \ Users \ Amul \ AndroidStudioProjects \ MyApplication2 \ andEngine \ src \ main \ jni \ src \ GLES20Fix.o:In function
Java_org_andengine_opengl_GLES20Fix_glVertexAttribPointer': C:\Users\Amul\AndroidStudioProjects\MyApplication2\andEngine\build\intermediates\ndk\release\obj/local/arm64-v8a/objs/andengine_shared/C_\Users\Amul\AndroidStudioProjects\MyApplication2\andEngine\src\main\jni\src\GLES20Fix.o: In function
Java_org_andengine_opengl_GLES20Fix_glDrawElements': C:\ Users \ Amul \ AndroidStudioProjects \ MyApplication2 \ andEngine \ src \ main \ jni \ src \ GLES20Fix.c 警告:(9,63)警告:從不同大小的整數轉換爲指針[-Wint-to-pointer-cast] 警告:(13,36)警告:從不同大小的整數轉換爲指針[-Wint-to-pointer-cast] 錯誤: (9)undefined參考glVertexAttribPointer' Error:(13) undefined reference to
glDrawElements' 錯誤:錯誤:ld返回1退出狀態 make:*** [C:\錯誤:執行失敗,任務':andEngine:compileReleaseNdk'。用戶\ Amul \ AndroidStudioProjects \ MyApplication2 \和發動機\ build \ intermediates \ ndk \ release \ obj /本地/ arm64-v8a/libandengine_shared.so錯誤1 錯誤:com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Amul\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd'' finished with non-zero exit value 2 Information:BUILD FAILED Information:Total time: 7.815 secs Information:4 errors Information:2 warnings Information:See complete output in console
未定義的引用在OpenGL中都是符號,所以依賴關係沒有得到解決。你在項目中鏈接到OpenGL嗎?請發佈Android.mk(如果你使用它)和build.gradle。 –