Fixed bug 2759 - Android findLibrary() returns NULL
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Fri, 24 Oct 2014 11:53:34 +0200
changeset 9184 741700a12835
parent 9183 9a0ebeef4988
child 9185 43f4122e1268
Fixed bug 2759 - Android findLibrary() returns NULL Sylvain extra patch with minor modifications: - typo - cancel-able set to false - add the error message, so that the user can report it.
android-project/src/org/libsdl/app/SDLActivity.java
--- a/android-project/src/org/libsdl/app/SDLActivity.java	Thu Oct 23 16:45:18 2014 +0200
+++ b/android-project/src/org/libsdl/app/SDLActivity.java	Fri Oct 24 11:53:34 2014 +0200
@@ -119,20 +119,26 @@
         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() {