Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ad68f05

Browse files
committed
see at kivy#866
1 parent 404c03a commit ad68f05

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

pythonforandroid/bootstraps/sdl2/build/src/org/kivy/android/PythonUtil.java

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
import java.io.File;
44

55
import android.util.Log;
6-
import java.util.ArrayList;
7-
import java.io.FilenameFilter;
6+
87

98
public class PythonUtil {
109
private static final String TAG = "PythonUtil";
@@ -15,38 +14,36 @@ protected static String[] getLibraries() {
1514
"SDL2_image",
1615
"SDL2_mixer",
1716
"SDL2_ttf",
17+
"crypto1.0.2h",
18+
"ssl1.0.2h",
19+
"sqlite3",
1820
"python2.7",
1921
"python3.5m",
2022
"python3.6m",
2123
"main"
2224
};
23-
24-
MyList.add("python2.7");
25-
MyList.add("python3.5m");
26-
MyList.add("main");
27-
return MyList;
2825
}
2926

30-
public static void loadLibraries(File filesDir) {
27+
public static void loadLibraries(File filesDir) {
3128

3229
String filesDirPath = filesDir.getAbsolutePath();
3330
boolean foundPython = false;
3431

35-
for (String lib : getLibraries(filesDir)) {
36-
try {
32+
for (String lib : getLibraries()) {
33+
//try {
3734
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+
//}
5047
}
5148

5249
try {

0 commit comments

Comments
 (0)