Skip to content

Commit

Permalink
Fixed bug 2759 - Android findLibrary() returns NULL
Browse files Browse the repository at this point in the history
Sylvain

extra patch with minor modifications:
- typo
- cancel-able set to false
- add the error message, so that the user can report it.
  • Loading branch information
philippwiesemann committed Oct 24, 2014
1 parent bc382e3 commit 1745116
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion android-project/src/org/libsdl/app/SDLActivity.java
Expand Up @@ -119,20 +119,26 @@ protected void onCreate(Bundle savedInstanceState) {
mSingleton = this;

// Load shared libraries
String errorMsgBrokenLib = "";
try {
loadLibraries();
} catch(UnsatisfiedLinkError e) {
System.err.println(e.getMessage());
mBrokenLibraries = true;
errorMsgBrokenLib = e.getMessage();
} catch(Exception e) {
System.err.println(e.getMessage());
mBrokenLibraries = true;
errorMsgBrokenLib = e.getMessage();
}

if (mBrokenLibraries)
{
AlertDialog.Builder dlgAlert = new AlertDialog.Builder(this);
dlgAlert.setMessage("An error occurred while trying to start the application. Please try again and/or reinstall.");
dlgAlert.setMessage("An error occurred while trying to start the application. Please try again and/or reinstall."
+ System.getProperty("line.separator")
+ System.getProperty("line.separator")
+ "Error: " + errorMsgBrokenLib);
dlgAlert.setTitle("SDL Error");
dlgAlert.setPositiveButton("Exit",
new DialogInterface.OnClickListener() {
Expand Down

0 comments on commit 1745116

Please sign in to comment.