繁体   English   中英

SSLCOMMERZ 致力于调试 apk 但不致力于发布 apk

[英]SSLCOMMERZ working on debug apk but not on release apk

我最近将来自 pubdev 的 SSLCOMMERS 集成到我的 flutter 应用程序中。 现在它在调试模式下工作正常但在我创建 apk 时不起作用。 我什至在发布和配置文件模式下运行该应用程序,但两者都运行良好。 我尝试添加 inte.net 权限,但也没有用。 实际上最大的问题是我看不到我创建的 apk 的日志。 任何形式的帮助将不胜感激

请尝试将以下代码添加到您应用的构建 gradle。 修改应用程序的构建 gradle 后,请通过命令flutter clean应用程序,然后再次构建发布 apk。 希望问题能得到解决。

buildTypes {
    release {
        // .................. your existing codes ..................
        // add these three lines
        
        shrinkResources false
        zipAlignEnabled false
        minifyEnabled false
        }
    }

这很简单。

使用这个 package: flutter_sslcommerz

试试这些步骤

编辑你的 android/app/src/main/AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" <!-- add this line must -->
    package="com.itmedicus.congressia.congressia">

然后

   <application
        android:label="congressia"
        android:name="${applicationName}"
       android:usesCleartextTraffic="true" <!-- add this line -->
       tools:replace="android:label".  <!-- add this line -->
        android:icon="@mipmap/ic_launcher">

然后编辑 android/app/build.gradle 并在你的构建类型中添加这两行

   buildTypes {
        release {
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
            shrinkResources false  // add this line
            minifyEnabled false  //add this line
        }
    }

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM