| Summary: | Joystick support for android prevents compilation for targets < 12 | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Michal Kolodziejczyk <miko> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | gabomdq |
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Android (All) | ||
You have to compile with target-12 as shipped by default in SDL and in AndroidManifest.xml: <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="12" /> Doing it like this, the app will work on API level 10 devices with no problem. Please see the README-android.txt file for more details. Also, #ifdefs don't exist in Java! Confirmed, sorry for the noise (I forgot why I set it for android-10, but it worked for me). Everything is OK now. |
Recently added patch for handling joysticks on android triggers compilation error when compiling for android target < android-12: -pre-compile: -compile: [javac] Compiling 4 source files to bin/classes [javac] src/org/libsdl/app/SDLActivity.java:957: error: cannot find symbol [javac] class SDLGenericMotionListener_API12 implements View.OnGenericMotionListener { [javac] ^ [javac] symbol: class OnGenericMotionListener [javac] location: class View [javac] src/org/libsdl/app/SDLActivity.java:494: error: cannot find symbol [javac] setOnGenericMotionListener(new SDLGenericMotionListener_API12()); [javac] ^ [javac] symbol: method setOnGenericMotionListener(SDLGenericMotionListener_API12) [javac] location: class SDLSurface [javac] src/org/libsdl/app/SDLActivity.java:890: error: cannot find symbol (and other joystick related errors). The code should probably handle cases for target < android-12, at least by using #ifdefs to omit the new API code. It compiles OK for SDL 2.0.1. (tried target android-10)