Skip to content

Commit

Permalink
Load native lib after opencv initialization
Browse files Browse the repository at this point in the history
this should fix leadrien#3
  • Loading branch information
leadrien committed Jan 23, 2017
1 parent f2ae548 commit 28f59a6
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public void onManagerConnected(int status) {
switch (status) {
case LoaderCallbackInterface.SUCCESS: {
Log.i(TAG, "OpenCV loaded successfully");
// Load ndk built module, as specified in moduleName in build.gradle
// after opencv initialization
System.loadLibrary("native-lib");
_cameraBridgeViewBase.enableView();
}
break;
Expand All @@ -40,10 +43,6 @@ public void onManagerConnected(int status) {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// Load ndk built module, as specified
// in moduleName in build.gradle
System.loadLibrary("native-lib");

getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.activity_main);

Expand Down

0 comments on commit 28f59a6

Please sign in to comment.