Closed
Description
I tried to compile an APK using python-for-android for the first time, using the Kivy Virtual Machine.
I have updated python-for-android to the latest github version (commit 8829312fd187121384939627ec09354657821ae9) to avoid the "Invalid or unsupported command list" error.
Since then, I faced two additional issues:
- Build fail at
ant
call becauseandroid-sdk/tools/ant/build.xml
does not exist anymore in latest releases of Android SDK. The only workaround I have found was to install an older SDK version prior to this change, such as android-sdk-r25.2.5. See here, here and here.
Example error:
BUILD FAILED
/home/kivy/.local/share/python-for-android/dists/unnamed_dist_2/build.xml:93: Cannot find /home/kivy/android/android-sdk/tools/ant/build.xml imported from /home/kivy/.local/share/python-for-android/dists/unnamed_dist_2/build.xml
- The build of Java classes is done with enforcement of v1.5 (-source 1.5), but
kivy/android/PythonService.java
includes a multi-catch statement that works only from v1.7 onwards.
Example error:
[INFO]: STDOUT (last 20 lines of 79):
-pre-compile:
-compile:
[javac] Compiling 22 source files to /home/kivy/.local/share/python-for-android/dists/unnamed_dist_1/bin/classes
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] /home/kivy/.local/share/python-for-android/dists/unnamed_dist_1/tmp-src/org/kivy/android/PythonService.java:107: error: multi-catch statement is not supported in -source 1.5
[javac] } catch (NoSuchMethodException | IllegalAccessException |
[javac] ^
[javac] (use -source 7 or higher to enable multi-catch statement)
[javac] 1 error
[javac] 3 warnings
BUILD FAILED
/home/kivy/android/android-sdk-r25.2.5/tools/ant/build.xml:716: The following error occurred while executing this line:
/home/kivy/android/android-sdk-r25.2.5/tools/ant/build.xml:730: Compile failed; see the compiler error output for details.
I'm stuck at this point, as I could not locate where the v1.5 enforcement takes place.
<
47CD
/div>
Metadata
Metadata
Assignees
Labels
No labels