gpt4 book ai didi

java - 安卓 Facebook SDK Eclipse Proguard

转载 作者:搜寻专家 更新时间:2023-11-01 08:29:24 25 4
gpt4 key购买 nike

我已经安装了 Facebook SDK 并且没有出现任何错误,但我似乎无法将其导出为我的 android 项目的一部分。启用 ProGuard 时出现以下错误:

Warning: com.facebook.applinks.FacebookAppLinkResolver$2: can't find referenced class bolts.Task$TaskCompletionSource
Warning: com.facebook.applinks.FacebookAppLinkResolver$2: can't find referenced class bolts.AppLink$Target
Warning: com.facebook.applinks.FacebookAppLinkResolver$2: can't find referenced class bolts.AppLink
Warning: com.facebook.applinks.FacebookAppLinkResolver$2: can't find referenced class bolts.AppLink$Target
Warning: com.facebook.messenger.MessengerUtils: can't find referenced class bolts.AppLinks
Warning: com.facebook.messenger.MessengerUtils: can't find referenced class bolts.AppLinks
You should check if you need to specify additional program jars.
Warning: there were 62 unresolved references to classes or interfaces.
You may need to specify additional library jars (using '-libraryjars').
java.io.IOException: Please correct the above warnings first.
at proguard.Initializer.execute(Initializer.java:321)
at proguard.ProGuard.initialize(ProGuard.java:211)
at proguard.ProGuard.execute(ProGuard.java:86)
at proguard.ProGuard.main(ProGuard.java:492)

我将以下内容添加到我的 ProGuard 文件中,但我仍然收到错误:

-keep class com.facebook.** {
*;
}

我应该如何配置 ProGuard 以使用 Facebook SDK?

最佳答案

我在我的 proguard-project.txt 中使用这些设置:

# Facebook Audience Network
-keep class com.facebook.ads.** { *; }
-keep class com.facebook.ads.internal.** { *; }
-keep class com.google.ads.mediation.facebook.FacebookAdapter {*;}
-keep class com.google.android.exoplayer.** {*;}

-dontwarn com.facebook.ads.**
-dontwarn com.google.android.exoplayer.**

关于java - 安卓 Facebook SDK Eclipse Proguard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42014732/

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