Skip to content

Commit dedfc89

Browse files
committed
Fixed filepath getting in PythonUtil.java
1 parent 4abb4d2 commit dedfc89

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ protected static String[] getLibraries() {
1919
}
2020

2121
public static void loadLibraries(File filesDir) {
22+
23+
String filesDirPath = filesDir.getAbsolutePath();
24+
2225
for (String lib : getLibraries()) {
2326
System.loadLibrary(lib);
2427
}
@@ -36,15 +39,15 @@ public static void loadLibraries(File filesDir) {
3639
}
3740

3841
try {
39-
System.load(getFilesDir() + "/lib/python2.7/lib-dynload/_io.so");
40-
System.load(getFilesDir() + "/lib/python2.7/lib-dynload/unicodedata.so");
42+
System.load(filesDirPath + "/lib/python2.7/lib-dynload/_io.so");
43+
System.load(filesDirPath + "/lib/python2.7/lib-dynload/unicodedata.so");
4144
} catch(UnsatisfiedLinkError e) {
4245
Log.v(TAG, "Failed to load _io.so or unicodedata.so...but that's okay.");
4346
}
4447

4548
try {
4649
// System.loadLibrary("ctypes");
47-
System.load(getFilesDir() + "/lib/python2.7/lib-dynload/_ctypes.so");
50+
System.load(filesDirPath + "/lib/python2.7/lib-dynload/_ctypes.so");
4851
} catch(UnsatisfiedLinkError e) {
4952
Log.v(TAG, "Unsatisfied linker when loading ctypes");
5053
}

0 commit comments

Comments
 (0)