Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] #5456 - Fixed library path so that HTTPContext class is bou…
Browse files Browse the repository at this point in the history
…nd without issues
  • Loading branch information
ivovandongen committed Jun 29, 2016
1 parent 4179bb5 commit 518c2b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ test-android: android-test-lib-arm-v7
adb push build/test.jar /data/local/tmp/
adb push build/android-arm-v7/Debug/lib.target/libmapbox-gl.so /data/local/tmp/
adb push build/android-arm-v7/Debug/lib.target/libtest-jni-lib.so /data/local/tmp/
adb shell "LD_LIBRARY_PATH=/data/local/tmp dalvikvm32 -cp /data/local/tmp/test.jar Main"
adb shell "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/system/lib:/data/local/tmp dalvikvm32 -cp /data/local/tmp/test.jar Main"
#TODO - Renable platform tests cd platform/android && ./gradlew testReleaseUnitTest --continue

apackage:
Expand Down
2 changes: 1 addition & 1 deletion platform/android/src/jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ extern "C" JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved) {

static mbgl::util::RunLoop mainRunLoop;

//XXX Need to figure out why this breaks everything mbgl::android::RegisterNativeHTTPRequest(env);
mbgl::android::RegisterNativeHTTPRequest(env);

latLngClass = &jni::FindClass(env, "com/mapbox/mapboxsdk/geometry/LatLng");
latLngClass = jni::NewGlobalRef(env, latLngClass).release();
Expand Down
4 changes: 3 additions & 1 deletion test/src/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ public class Main {
public native void runAllTests();

public static void main(String[] args) throws Exception {
//System.out.println(Class.forName("com.mapbox.mapboxsdk.geometry.LatLng"));
//Need to load the mapbox-gl library explicitly first
System.loadLibrary("mapbox-gl");
//Load the tests
System.loadLibrary("test-jni-lib");
System.out.println("Libraries loaded");
//Run the tests
new Main().runAllTests();
}
}

0 comments on commit 518c2b8

Please sign in to comment.