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,这里不需要混淆,暂时关闭。

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

相关推荐
三品吉他手会点灯4 分钟前
嵌入式机器学习 - 学习笔记1.1.1 - 什么是机器学习?
c语言·人工智能·笔记·嵌入式硬件·学习·机器学习
qq5752173194 分钟前
Notepad++下载和安装
笔记·notepad++·记事本
换个昵称21 小时前
大模型学习8下-高性能推理引擎vLLM学习笔记
笔记·学习·vllm
LONGZHIQIN1 小时前
C#基础复习笔记
开发语言·笔记·c#
得闲喝茶2 小时前
跨表数据匹配——VLOOKUP、XLOOKUP
大数据·数据库·笔记·信息可视化·数据分析·excel
智慧景区与市集主理人3 小时前
巨有科技:市集笔记内容分发,低成本打造本地流量曝光矩阵
大数据·笔记·科技
IDIOSF4 小时前
Apple Notes Liberator:把 Apple Notes 里的笔记搬出来
笔记·其他
ljt27249606614 小时前
CPU:从底层电路到高性能执行架构
笔记
普普通通的一名码农4 小时前
TPS6120芯片说明
驱动开发·笔记·芯片手册
Amazing_Cacao5 小时前
CFCA精品可可工艺师初级校准:暴力破解机器黑盒,实现物理参数与最终风味的精准对齐
笔记·学习