@@ -14,25 +14,41 @@ protected static String[] getLibraries() {
14
14
"SDL2_image" ,
15
15
"SDL2_mixer" ,
16
16
"SDL2_ttf" ,
17
- "python2.7" ,
18
17
"main"
19
18
};
20
19
}
21
20
22
21
public static void loadLibraries (File filesDir ) {
23
22
for (String lib : getLibraries ()) {
24
- System .loadLibrary (lib );
25
- }
26
-
27
- System .load (filesDir + "/lib/python2.7/lib-dynload/_io.so" );
28
- System .load (filesDir + "/lib/python2.7/lib-dynload/unicodedata.so" );
29
-
30
- try {
31
- System .load (filesDir + "/lib/python2.7/lib-dynload/_ctypes.so" );
32
- } catch (UnsatisfiedLinkError e ) {
33
- Log .v (TAG , "Unsatisfied linker when loading ctypes" );
34
- }
35
-
36
- Log .v (TAG , "Loaded everything!" );
23
+ System .loadLibrary (lib );
24
+ }
25
+
26
+ try {
27
+ System .loadLibrary ("python2.7" );
28
+ } catch (UnsatisfiedLinkError e ) {
29
+ Log .v (TAG , "Failed to load libpython2.7" );
30
+ }
31
+
32
+ try {
33
+ System .loadLibrary ("python3.5m" );
34
+ } catch (UnsatisfiedLinkError e ) {
35
+ Log .v (TAG , "Failed to load libpython3.5m" );
36
+ }
37
+
38
+ try {
39
+ System .load (getFilesDir () + "/lib/python2.7/lib-dynload/_io.so" );
40
+ System .load (getFilesDir () + "/lib/python2.7/lib-dynload/unicodedata.so" );
41
+ } catch (UnsatisfiedLinkError e ) {
42
+ Log .v (TAG , "Failed to load _io.so or unicodedata.so...but that's okay." );
43
+ }
44
+
45
+ try {
46
+ // System.loadLibrary("ctypes");
47
+ System .load (getFilesDir () + "/lib/python2.7/lib-dynload/_ctypes.so" );
48
+ } catch (UnsatisfiedLinkError e ) {
49
+ Log .v (TAG , "Unsatisfied linker when loading ctypes" );
50
+ }
51
+
52
+ Log .v (TAG , "Loaded everything!" );
37
53
}
38
54
}
0 commit comments