File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed
pythonforandroid/bootstraps/sdl2/build/src/org/kivy/android Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -14,30 +14,29 @@ protected static String[] getLibraries() {
1414 "SDL2_image" ,
1515 "SDL2_mixer" ,
1616 "SDL2_ttf" ,
17+ "python2.7" ,
18+ "python3.5m" ,
1719 "main"
1820 };
1921 }
2022
2123 public static void loadLibraries (File filesDir ) {
2224
2325 String filesDirPath = filesDir .getAbsolutePath ();
26+ boolean skippedPython = false ;
2427
2528 for (String lib : getLibraries ()) {
26- System .loadLibrary (lib );
29+ try {
30+ System .loadLibrary (lib );
31+ } catch (UnsatisfiedLinkError e ) {
32+ if (lib .startsWith ("python" ) && !skippedPython ) {
33+ skippedPython = true ;
34+ continue ;
35+ }
36+ throw e ;
37+ }
2738 }
2839
29- try {
30- System .loadLibrary ("python2.7" );
31- } catch (UnsatisfiedLinkError e ) {
32- Log .v (TAG , "Failed to load libpython2.7" );
33- }
34-
35- try {
36- System .loadLibrary ("python3.5m" );
37- } catch (UnsatisfiedLinkError e ) {
38- Log .v (TAG , "Failed to load libpython3.5m" );
39- }
40-
4140 try {
4241 System .load (filesDirPath + "/lib/python2.7/lib-dynload/_io.so" );
4342 System .load (filesDirPath + "/lib/python2.7/lib-dynload/unicodedata.so" );
You can’t perform that action at this time.
0 commit comments