Skip to content

Commit

Permalink
Add even more logging for UnsatisfiedLinkError (flutter#51554)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmackall authored Mar 20, 2024
1 parent 14cbaab commit 8bd89b6
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ public InitResult call() {
// cpu architecture.

String cpuArch = System.getProperty("os.arch");
String[] nativeLibs = new File(flutterApplicationInfo.nativeLibraryDir).list();
File nativeLibsDir = new File(flutterApplicationInfo.nativeLibraryDir);
String[] nativeLibsContents = nativeLibsDir.list();

throw new UnsupportedOperationException(
"Could not load libflutter.so this is possibly because the application"
Expand All @@ -205,8 +206,10 @@ public InitResult call() {
+ " for more detail.\n"
+ "App is using cpu architecture: "
+ cpuArch
+ ", and the native libraries directory contains the following files: "
+ Arrays.toString(nativeLibs),
+ ", and the native libraries directory (with path "
+ nativeLibsDir.getAbsolutePath()
+ ") contains the following files: "
+ Arrays.toString(nativeLibsContents),
unsatisfiedLinkError);
}

Expand Down

0 comments on commit 8bd89b6

Please sign in to comment.