3
3
import java .io .File ;
4
4
5
5
import android .util .Log ;
6
- import java .util .ArrayList ;
7
- import java .io .FilenameFilter ;
6
+
8
7
9
8
public class PythonUtil {
10
9
private static final String TAG = "PythonUtil" ;
@@ -15,38 +14,36 @@ protected static String[] getLibraries() {
15
14
"SDL2_image" ,
16
15
"SDL2_mixer" ,
17
16
"SDL2_ttf" ,
17
+ "crypto1.0.2h" ,
18
+ "ssl1.0.2h" ,
19
+ "sqlite3" ,
18
20
"python2.7" ,
19
21
"python3.5m" ,
20
22
"python3.6m" ,
21
23
"main"
22
24
};
23
-
24
- MyList .add ("python2.7" );
25
- MyList .add ("python3.5m" );
26
- MyList .add ("main" );
27
- return MyList ;
28
25
}
29
26
30
- public static void loadLibraries (File filesDir ) {
27
+ public static void loadLibraries (File filesDir ) {
31
28
32
29
String filesDirPath = filesDir .getAbsolutePath ();
33
30
boolean foundPython = false ;
34
31
35
- for (String lib : getLibraries (filesDir )) {
36
- try {
32
+ for (String lib : getLibraries ()) {
33
+ // try {
37
34
System .loadLibrary (lib );
38
- if (lib .startsWith ("python" )) {
39
- foundPython = true ;
40
- }
41
- } catch (UnsatisfiedLinkError e ) {
42
- // If this is the last possible libpython
43
- // load, and it has failed, give a more
44
- // general error
45
- if (lib .startsWith ("python3.6" ) && !foundPython ) {
46
- throw new java .lang .RuntimeException ("Could not load any libpythonXXX.so" );
47
- }
48
- continue ;
49
- }
35
+ // if (lib.startsWith("python")) {
36
+ // foundPython = true;
37
+ // }
38
+ // } catch(UnsatisfiedLinkError e) {
39
+ //// If this is the last possible libpython
40
+ //// load, and it has failed, give a more
41
+ //// general error
42
+ // if (lib.startsWith("python3.6") && !foundPython) {
43
+ // throw new java.lang.RuntimeException("Could not load any libpythonXXX.so");
44
+ // }
45
+ // continue;
46
+ // }
50
47
}
51
48
52
49
try {
0 commit comments