comparison README.android @ 4964:6c645018741e

Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 06 Jan 2011 16:11:21 -0800
parents 144d9df7e611
children 91d0085b7560
comparison
equal deleted inserted replaced
4963:604077962776 4964:6c645018741e
1 ================================================================================ 1 ================================================================================
2 Simple DirectMedia Layer for Android 2 Simple DirectMedia Layer for Android
3 ================================================================================ 3 ================================================================================
4 4
5 Requirements: Android NDK r4 or later 5 Requirements: Android SDK and Android NDK r4 or later
6 http://developer.android.com/
6 7
7 ================================================================================ 8 ================================================================================
8 How the port works 9 How the port works
9 ================================================================================ 10 ================================================================================
10 11
14 - This means that your application C code must be placed inside an android 15 - This means that your application C code must be placed inside an android
15 Java project, along with some C support code that communicates with Java 16 Java project, along with some C support code that communicates with Java
16 - This eventually produces a standard Android .apk package 17 - This eventually produces a standard Android .apk package
17 18
18 19
19
20
21
22
23 ================================================================================ 20 ================================================================================
24 Building an app 21 Building an app
25 ================================================================================ 22 ================================================================================
26 23
27 Instructions: 24 Instructions:
28 1. Edit android/config.cfg to point to the location of the NDK 25 1. Copy the android-project directory wherever you want your Android project to go
29 2. Run 'make -f Makefile.android'. If all goes well, libsdl.a should be created 26 2. Move this SDL directory into the <project>/jni directory
30 3. Place your application source files in android/project/jni 27 3. Place your application source files in the <project>/jni/src directory
31 4. Edit the Android.mk to include your source files 28 4. Edit <project>/jni/src/Android.mk to include your source files
32 5. Run 'ndk-build' (a script provided by the NDK). This compiles the C source 29 5. Run 'ndk-build' (a script provided by the NDK). This compiles the C source
33 6. Edit project/local.properties to point to the SDK directory 30
34 6. Run 'ant debug' in android/project. This compiles the .java and eventually 31 If you want to use the Eclipse IDE, skip to the Eclipse section below.
35 creates a .apk with the C source embedded 32
36 7. 'ant install' will push the apk to the device or emulator (if connected) 33 6. Edit <project>/local.properties to point to the Android SDK directory
34 7. Run 'ant debug' in android/project. This compiles the .java and eventually
35 creates a .apk with the native code embedded
36 8. 'ant install' will push the apk to the device or emulator (if connected)
37 37
38 38
39 ================================================================================
40 Using Eclipse
41 ================================================================================
42
43 NEED CONTENT
44
45
46 ================================================================================
47 Loading files
48 ================================================================================
49
50 NEED CONTENT
51
52
53 ================================================================================
54 Troubleshooting
55 ================================================================================
56
57 NEED CONTENT
39 58
40 59
41 ================================================================================ 60 ================================================================================
42 Known issues 61 Known issues
43 ================================================================================ 62 ================================================================================