Java android proguard禁用youtube api oauth?

Java android proguard禁用youtube api oauth?,java,android,google-api,youtube-api,proguard,Java,Android,Google Api,Youtube Api,Proguard,我在这里使用youtube java api客户端 当我完成编码时,应用程序在未签名时运行良好。当我签名时,Android用proguard签名,这使得签名的apk。我安装了它,应用程序出错了。当我尝试登录时,它无法调用正确的方法。我想,与未签名时不同,它运行得很好 这是proguard-google-api-client.txt # ProGuard Configuration file # # See http://proguard.sourceforge.net/index.html#ma

我在这里使用youtube java api客户端

当我完成编码时,应用程序在未签名时运行良好。当我签名时,Android用proguard签名,这使得签名的apk。我安装了它,应用程序出错了。当我尝试登录时,它无法调用正确的方法。我想,与未签名时不同,它运行得很好

这是proguard-google-api-client.txt

# ProGuard Configuration file
#
# See http://proguard.sourceforge.net/index.html#manual/usage.html

# Needed to keep generic types and @Key annotations accessed via reflection

-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault

-keepclassmembers class * {
  @com.google.api.client.util.Key <fields>;
}

# Needed by Guava
# See https://groups.google.com/forum/#!topic/guava-discuss/YCZzeCiIVoI

-dontwarn sun.misc.Unsafe
-dontwarn com.google.common.collect.MinMaxPriorityQueue

# Needed by google-http-client-android when linking against an older platform version

-dontwarn com.google.api.client.extensions.android.**

# Needed by google-api-client-android when linking against an older platform version

-dontwarn com.google.api.client.googleapis.extensions.android.**

我添加了另一个jar,因此我添加了proguard flurry.txt

您确定proguard.config分配了两个值还是只分配了后一个值?我猜您只需在第一个setter的末尾添加:proguard-flurry.txt,就可以将它合并到一个语句中。您得到的确切错误消息/堆栈跟踪是什么?@JarekWilkiewicz我得到了,在proguard-google-api-client.txt中添加-keep class com.google.api.services.*{*;}。会有用的。你帮我节省了时间!。谢谢
# ProGuard Configuration file
#
-keep class com.flurry.** { *; }
-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault

-keepclassmembers class * {
  @com.google.api.client.util.Key <fields>;
}

-dontwarn com.flurry.**

-dontwarn com.google.api.client.googleapis.extensions.android.gms.auth.**

-dontwarn com.google.common.cache.**

-dontwarn com.google.common.primitives.**
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt:proguard-google-api-client.txt

# FlurryAgent
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt:proguard-flurry.txt

# Project target.
target=Amazon:Kindle Fire (2nd Generation):15
android.library.reference.1=../gridlayout_v7