flutter开发实战-混淆minifyEnabled及shrinkResources

flutter开发实战-混淆minifyEnabled及shrinkResources

最近开发中,出现了在Debug模式下完全正常,打包build后出现插件代码调用提示未实现。

No implementation found for method login on channel app_plugin

经过查找发现在build apk时候出现了混淆的问题,下面把这个功能关掉

一、调整android/app/build.gradle

找到build.gradle,我们这里关闭minifyEnabled与shrinkResources

复制代码
android {
    compileSdkVersion flutter.compileSdkVersion
    ndkVersion flutter.ndkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.flutter_app"
        // You can update the following values to match your application needs.
        // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
        minSdkVersion 21
        targetSdkVersion flutter.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

    buildTypes {
        release {
            minifyEnabled false
            shrinkResources false
        }
    }
}

二、总结

flutter开发实战-混淆minifyEnabled及shrinkResources,这里不需要混淆,暂时关闭。

学习记录,每天不停进步。

相关推荐
Yeh2020583 小时前
MySQL笔记二
笔记
elseif1234 小时前
CSP-S提高级大纲
开发语言·数据结构·c++·笔记·算法·大纲·考纲
兰.lan4 小时前
【黑马ai测试】Day01课堂笔记+课后作业
软件测试·笔记·python·ai·单元测试
Jack.Jia4 小时前
GPS原理笔记二——GPS信号和导航电文
笔记
zzh0814 小时前
MySQL数据库操作笔记
数据库·笔记·mysql
C羊驼5 小时前
C/C++数据结构与算法:穷举法
c语言·c++·笔记·学习·算法
hanlin036 小时前
刷题笔记:力扣第17题-电话号码的字母组合
笔记·算法·leetcode
لا معنى له6 小时前
JEPA:联合嵌入预测架构介绍 ——学习笔记
笔记·学习
sprite_雪碧6 小时前
考研机试笔记-1输入输出
笔记·考研·华为od
xian_wwq7 小时前
【学习笔记】数据投毒的9种攻击方法与防御措施
笔记·学习·数据投毒