Closed
Description
using flutter build apk --release --flavor pro
make apk file , but arm64-v8a do not include libflutter.so file.so app launch fail.
when I add --target-platform=android-arm64
: flutter build apk --release --flavor pro --target-platform=android-arm64
,apk file include so flie. But app launch fail on 32 bit cpu.
what can i do, apk file can run on 64 and 32 cpu @mravn-google
/System.err(15263): java.lang.UnsatisfiedLinkError: Couldn't load flutter from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.jianzhibao.ka.enterprise-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.jianzhibao.ka.enterprise-1, /vendor/lib, /system/lib]]]: findLibrary returned null
I create new project, debug or releas, work well. diffrece from new project from my project is that i add thrid party so
file
where is the problem ?
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
swavkulinski commentedon Jun 21, 2018
AFAIK, currently, Flutter will only add libflutter.so to one selected platform folder in the release APK. The workaround which worked for me was to force build.gradle to do 32bit only (excluding all 64bit libraries + Intel)
zoechi commentedon Jun 22, 2018
cc @Hixie
jeanpaulcozzatti commentedon Jul 1, 2018
@swavkulinski how would you release the to apks to the playstore?
Ffmpeg native android lib included ABIS for x64 and x86 CPU's -> Flut…
kevinvandenbreemen commentedon Jul 24, 2018
Similar to #18939
qbsho commentedon Jul 26, 2018
Have the same problem - but flutter.so not included in "armeabi-v7a folder.
Has only third party libraries for x86 and armeabi-v7a - but no arm64.
Would like to build flutter only for "armeabi-v7a with
ndk{
abiFilters "armeabi-v7a" // also not work"armeabi", "x86",
}
and set as target-platform as @mravn-google suggest to android-arm.
APK without specify arch and not include libraries

APK with libraries and no arm spec

APK with specify arch and include libraries

Any suggestion how to debug further steps?
peasfarmer commentedon Aug 9, 2018
gurleensethi commentedon Aug 13, 2018
I have the same problem, building for 32-bit will exclude 64-bit devices, it runs on them though. Building for 64 by specifying
--target-platform android-arm64
works on 64-bit devices, but crashes on 32-bit devices. Also Google will be restricting upload of apks to be 64-bit in 2019.Flutter Team, please resolve this basic issue!
dieegov commentedon Aug 14, 2018
bdytx5 commentedon Aug 30, 2018
So am I wrong by saying that flutter can only support release apk’s for either 32 or 64 bit, but not both?
jeanpaulcozzatti commentedon Sep 13, 2018
bdytx5 commentedon Sep 14, 2018
332 remaining items