gpt4 book ai didi

parse-platform - Parse jar 可以减少到更少的方法吗?

转载 作者:行者123 更新时间:2023-12-03 20:20:52 25 4
gpt4 key购买 nike

由于 Android 64k 最大方法限制,我试图减少 Parse Android SDK 提供的方法数量。 Parse-1.5.0.jar 有大约 4,500 多个方法。有什么建议?

删除 SDK 并使用 REST API 是可能的,但可能有点耗时。

最佳答案

尝试使用 ProGuard 并忽略使用 REST API 的想法......老实说,我从未听说过针对此类问题的解决方法 0_o

如果您不想减慢部署速度,只需告诉 ProGuard 缩小您的代码,跳过诸如 obuscation 之类的其他功能。 proguard-project.txt文件或多或少是这样的:

-dontoptimize
-dontobfuscate
-allowaccessmodification
-dontpreverify

# The remainder of this file is identical to the non-optimized version
# of the Proguard configuration file (except that the other file has
# flags to turn off optimization).

-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose

-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService

# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-keepclasseswithmembernames class * {
native <methods>;
}

# keep setters in Views so that animations can still work.
# see http://proguard.sourceforge.net/manual/examples.html#beans
-keepclassmembers public class * extends android.view.View {
void set*(***);
*** get*();
}

# We want to keep methods in Activity that could be used in the XML attribute onClick
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}

# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}

-keepclassmembers class **.R$* {
public static <fields>;
}

# The support library contains references to newer platform versions.
# Don't warn about those in case this app is linking against an older
# platform version. We know about them, and they are safe.
-dontwarn android.support.**

关于parse-platform - Parse jar 可以减少到更少的方法吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24830225/

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