I worked around that error by editing SDL_android_main.c:
extern C
{
/* Called before SDL_main() to initialize JNI bindings in SDL library */
extern void SDL_Android_Init(JNIEnv* env, jclass cls);
}
So I'm at least able to build again now... Though it still crashes when I
try to run the APK...
On Tue, Aug 25, 2015 at 09:59:14 -0500, Peter List wrote:
// required to avoid run found with adb logcat
extern void Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass
cls, jobject obj);
There's an SDL_android_main.c file you need to compile. I have a
personal Android/NDK app here:
On 08/23/2015 04:44 PM, Peter List wrote:
How do I tell cmake to include Ant Build in my vcxproj, so that
it will package my project into an APK? I can generate vcxproj
that builds a Tegra-Android *.so file, but it does not build me
an APK, and my vcxproj is missing the Ant Build property
Per Brad's suggestion, I removed this line from my CMakeLists.txt:
add_library(${PROJECT_NAME} SHARED ${SRC_LIST})
And I added these lines:
set(CMAKE_ANDROID_GUI TRUE)
set(CMAKE_ANDROID_API 19) # Kindle Fire HD 6
set(CMAKE_ANDROID_API_MIN 19) # Kindle Fire HD 6
add_executable(${PROJECT_NAME}
I'm now attempting to build a simple SDL2 Android application with CMake's
built-in Android support (uses nvidia tegra nsight for visual studio 2010)
SDL2-2.0.3 does not appear to have a NativeActivity example so I'm
attempting to use its android-project folder that includes
TLDR: How do I tell cmake to include Ant Build in my vcxproj, so that it
will package my project into an APK? I can generate vcxproj that builds a
Tegra-Android *.so file, but it does not build me an APK, and my vcxproj is
missing the Ant Build property section. As a reference, if I use Visual