Reputation: 21
I'm getting this error, in a project where I have used below modules of "AndEngine",
1) andEngine 2) andEnginePhysicsBox2DExtension 3) andEngineTexturePackerExtension
Previously(2 - 3 months back), the Project was executing properly. And now, when I tried to execute the code, I'm facing this error.
When I tried to comment the "LOCAL_CFLAGS:= -Werror" line, from "Android.mk" of "andEngine" module then I got the error as below,
[armeabi-v7a] Compile++ arm : andenginephysicsbox2dextension <= b2PolygonAndCircleContact.cpp
In file included from <built-in>:346:
<command line>:6:9: warning: '__ANDROID_API__' macro redefined [-Wmacro-redefined]
#define __ANDROID_API__ 14
^
<built-in>:338:9: note: previous definition is here
#define __ANDROID_API__ 9
^
error: error opening 'C:/Users/.../andEnginePhysicsBox2DExtension/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/andenginephysicsbox2dextension/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.o.d': No such file or directory
1 warning and 1 error generated.
make: *** [C:/Users/.../andEnginePhysicsBox2DExtension/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/andenginephysicsbox2dextension/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.o] Error 1
FYI... Android Studio : 2.3.3. NDK : Is up-to-date.
Thanks in Advance.
Upvotes: 2
Views: 3948
Reputation: 11
After long research, finally got the solution.
All you got to do is,
1) In the "Android.mk" file of "andEngine", replace the line with "LOCAL_CFLAGS := -Werror" with "LOCAL_CFLAGS := -w". Where, "-Werror" shows warnings as it is an error and "-w" suppresses all the warnings(which are not actual errors) related to "andEngine" and other modules.
2) Kindly clean the project and it should work in most of the cases. In case, you still have some error(s) then follow the step 3.
3) You now have to delete the "jniLibs" folder present in "andEngine\src\main\" path(Or the path of folder mention in place of "andEngine" in that error) and recompile the code.
Error:Execution failed for task ':andEngine:transformNativeLibsWithMergeJniLibsForDebug'. More than one file was found with OS independent path 'lib/x86/libandengine.so'
And thank you all for your comments/suggestions.
Upvotes: 1