File tree 1 file changed +12
-13
lines changed
pythonforandroid/bootstraps/sdl2/build/src/org/kivy/android
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() {
14
14
"SDL2_image" ,
15
15
"SDL2_mixer" ,
16
16
"SDL2_ttf" ,
17
+ "python2.7" ,
18
+ "python3.5m" ,
17
19
"main"
18
20
};
19
21
}
20
22
21
23
public static void loadLibraries (File filesDir ) {
22
24
23
25
String filesDirPath = filesDir .getAbsolutePath ();
26
+ boolean skippedPython = false ;
24
27
25
28
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
+ }
27
38
}
28
39
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
-
41
40
try {
42
41
System .load (filesDirPath + "/lib/python2.7/lib-dynload/_io.so" );
43
42
System .load (filesDirPath + "/lib/python2.7/lib-dynload/unicodedata.so" );
You can’t perform that action at this time.
0 commit comments