gpt4 book ai didi

android - 在工作室中使用混淆器时找不到符号方法

转载 作者:太空宇宙 更新时间:2023-11-03 13:50:15 26 4
gpt4 key购买 nike

我在 strudio 中创建了一个应用程序并在其中添加了一个模块,我正在尝试在该模块中使用混淆器。

但我在构建我的应用程序时确实遇到了以下错误。

enter image description here

下面是proguard-rules.procom.jsondb是我自己的类

-keep class com.bluelinelabs.logansquare.** { *; }
-keep @com.bluelinelabs.logansquare.annotation.JsonObject class *
-keep class **$$JsonObjectMapper { *; }

-keep class io.realm.annotations.RealmModule
-keep @io.realm.annotations.RealmModule class *
-keep class io.realm.internal.Keep
-keep @io.realm.internal.Keep class * { *; }
-dontwarn javax.**
-dontwarn io.realm.**

-keep public class com.jsondb.db.DB { *; }
-keep public class com.jsondb.db.model { *; }
-keep public class com.jsondb.rest.RestApi { *; }
-keep public class com.jsondb.rest.RestApiCallback { *; }

以下是module的build.gradle

apply plugin: 'com.android.library'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
apt 'com.bluelinelabs:logansquare-compiler:1.3.4'
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.squareup.retrofit2:retrofit:2.0.0-beta3'
compile 'com.github.aurae.retrofit2:converter-logansquare:1.2.1'
compile 'com.bluelinelabs:logansquare:1.3.4'
compile 'io.realm:realm-android:0.87.4'
}

最佳答案

我通过添加缺少的模型类解决了这个问题

-keep public class com.jsondb.model.user.** {*; }

关于android - 在工作室中使用混淆器时找不到符号方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35911025/

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