0

当我尝试使用 Google Analytics 导出我的 APK 并激活 Proguard 时,我遇到了这个问题。

我已经在我的conf中添加了这个条件->

  -keep public class com.google.** {*;}

这是控制台输出

  Proguard returned with error code 1. See console
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.EasyTracker: can't find referenced class com.google.android.apps.analytics.Item
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.EasyTracker: can't find referenced class com.google.android.apps.analytics.Transaction
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.EasyTracker$4: can't find referenced class com.google.android.apps.analytics.Item
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.EasyTracker$4: can't find referenced class com.google.android.apps.analytics.Item
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.EasyTracker$5: can't find referenced class com.google.android.apps.analytics.Transaction
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.EasyTracker$5: can't find referenced class com.google.android.apps.analytics.Transaction
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegate: can't find referenced class com.google.android.apps.analytics.Transaction
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegate: can't find referenced class com.google.android.apps.analytics.Item
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
    [2013-10-26 19:25:17 - UploadToServer] Warning: com.google.android.apps.analytics.easytracking.GoogleAnalyticsTrackerDelegateImpl: can't find referenced class com.google.android.apps.analytics.GoogleAnalyticsTracker
4

1 回答 1

4

删除你的;

-keep public class com.google.** {*;}

并将这两行添加到您的 prpguard.cfg

-keep class com.google.** {*;}
-keepclassmembers class com.google.** {*;}

如果您仍然收到错误,请添加此行。

-dontwarn com.google.**
于 2013-10-26T21:11:24.097 回答