gpt4 book ai didi

android - 如何在android中排除外部第三方依赖的ProGuard

转载 作者:行者123 更新时间:2023-12-05 06:30:38 25 4
gpt4 key购买 nike

我正在使用第三方依赖项。它在 Debug模式下运行良好,如果我使用

生成签名的 apk,它也运行良好
 buildTypes {
release {

minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}

但崩溃时

 buildTypes {
release {

minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}

我的日志猫是

09-05 18:56:39.124 4730-4730/? A/art: art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: fid == null
09-05 18:56:39.125 4730-4730/? A/art: art/runtime/java_vm_ext.cc:470] in call to GetObjectField
art/runtime/java_vm_ext.cc:470] from int com.opentok.android.Session.init(java.lang.String, android.content.Context, java.lang.String, java.lang.String, boolean)
art/runtime/java_vm_ext.cc:470] "main" prio=5 tid=1 Runnable
art/runtime/java_vm_ext.cc:470] | group="main" sCount=0 dsCount=0 obj=0x75654000 self=0xabb84400
art/runtime/java_vm_ext.cc:470] | sysTid=4730 nice=-10 cgrp=default sched=0/0 handle=0xae8e3534
art/runtime/java_vm_ext.cc:470] | state=R schedstat=( 273272463 63970668 410 ) utm=20 stm=5 core=0 HZ=100
art/runtime/java_vm_ext.cc:470] | stack=0xbe1e5000-0xbe1e7000 stackSize=8MB
art/runtime/java_vm_ext.cc:470] | held mutexes= "mutator lock"(shared held)

最佳答案

只需将这一行放在 ProGuard 文件中

-keep public class android.support.v4.** { *;}

android.support.v4 替换为您的外部第三方包名称

关于android - 如何在android中排除外部第三方依赖的ProGuard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52185277/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com