Browse Source

fix bug: java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in "/data/app/~~fQ1ReUB9uBx0IyUovshiQg==/com.szls.lszlgl-ozYAHLRC0AkdtBf_BeOaZg==/lib/arm64/libLabelPrinterSDK.so"

周素华 10 months ago
parent
commit
eddf79f56c

+ 10 - 0
android/app/build.gradle

@@ -68,11 +68,21 @@ android {
68 68
             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
69 69
             signingConfig signingConfigs.release
70 70
             manifestPlaceholders = [APP_NAME: "国粮质检"]
71
+            shrinkResources false // 重要,打印机有so库,fix bug: https://github.com/flutter/flutter/issues/47527
72
+            minifyEnabled false // 重要,打印机有so库,fix bug: https://github.com/flutter/flutter/issues/47527
73
+            ndk {
74
+                abiFilters "armeabi-v7a"  // 主要减包大小,效果是能减少一半,以arm64-v8a为主ABI的设备,辅助ABI为armeabi-v7a和armeabi;以armeabi-v7a为主ABI的设备,辅助ABI为armeabi。
75
+            }
71 76
         }
72 77
         profile {
73 78
             signingConfig signingConfigs.release
74 79
             manifestPlaceholders = [APP_NAME: "国粮质检-测试"]
75 80
             applicationIdSuffix ".debug"
81
+            shrinkResources false // 重要,打印机有so库,fix bug: https://github.com/flutter/flutter/issues/47527
82
+            minifyEnabled false // 重要,打印机有so库,fix bug: https://github.com/flutter/flutter/issues/47527
83
+            ndk {
84
+                abiFilters "armeabi-v7a"  // 主要减包大小,效果是能减少一半,以arm64-v8a为主ABI的设备,辅助ABI为armeabi-v7a和armeabi;以armeabi-v7a为主ABI的设备,辅助ABI为armeabi。
85
+            }
76 86
         }
77 87
         debug {
78 88
             signingConfig signingConfigs.release

BIN
android/app/jniLibs/armeabi-v7a/libConfigFileINI.so


BIN
android/app/jniLibs/armeabi-v7a/libLabelPrinterSDK.so


BIN
android/app/jniLibs/armeabi-v7a/libSimpleLogModule.so


BIN
android/app/jniLibs/armeabi-v7a/libc++_shared.so