From 515f5a3c75555c2640bdb3b0c8c52f655f5a0675 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Wed, 19 Aug 2020 14:42:44 +0800 Subject: [PATCH] packagingOptions --- example/android/app/build.gradle | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 9e3d04e..8b1ae42 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -48,6 +48,14 @@ android { signingConfig signingConfigs.debug } } + + packagingOptions { + // libsdkcore.so是被加固过的,不能被压缩,否则加载动态库时会报错 + doNotStrip "*/x86/libsdkcore.so" + doNotStrip "*/x86_64/libsdkcore.so" + doNotStrip "*/armeabi-v7a/libsdkcore.so" + doNotStrip "*/arm64-v8a/libsdkcore.so" + } } flutter { @@ -58,4 +66,4 @@ dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' -} +} \ No newline at end of file