Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WARN: Unable to load JNA library (OS: Mac OS X 12.2) warning when running flutter app on release mode. (M1 Mac)

I built a simple tic-tac-toe app on Flutter. It works in debug mode without any problem, but when I run it in release mode it gives me an error:

WARN: Unable to load JNA library (OS: Mac OS X 12.2)
java.lang.UnsatisfiedLinkError: /Users/rza/Library/Caches/JNA/temp/jna10193542212619812140.tmp: dlopen(/Users/rza/Library/Caches/JNA/temp/jna10193542212619812140.tmp, 0x0001): tried: '/Users/rza/Library/Caches/JNA/temp/jna10193542212619812140.tmp' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')), '/usr/lib/jna10193542212619812140.tmp' (no such file)

I'm running the app in release mode in a virtual Android machine.

I am assuming it is about CPU architecture. How can I fix this?

like image 886
Rza İsmayıl Avatar asked Sep 12 '25 15:09

Rza İsmayıl


2 Answers

Just had this error as well. This happens with flutter 2.10.1 on a mac with M1.

I got rid of it by doing a

$ flutter clean

in my project directory.

like image 95
Olaf Schlüter Avatar answered Sep 15 '25 06:09

Olaf Schlüter


It's an issue with old build files. Just delete build files manually or run

flutter clean

like image 37
Md omer arafat Avatar answered Sep 15 '25 04:09

Md omer arafat