使用Eclipse与通用ImageLoader库和动画的Proguard错误

时间:2015-01-14 17:32:38

标签: android eclipse proguard universal-image-loader protected

我试图通过使用eclipse在我的代码中应用proguard来保护我的代码我在libs文件夹中的项目中使用了这些库

  1. 库/ AndroidViewAnimations-1.1.3.jar
  2. libs / NineOldAndroid-2.4.0.jar
  3. 库/万向图像架1.9.2与 - sources.jar
  4. 库/机器人支撑-v4.jar
  5. 库/ AndroidEasingFunctions-1.0.0.jar
  6. 这是我的 Project.properties 内容:

    # 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
    
    # Project target.
    target=android-17
    android.library.reference.1=..\\appcompat
    android.library.reference.2=..\\google_play_services\\libproject\\google-play-services_lib
    android.library.reference.3=../appcompat_v7
    android.library.reference.4=../../adt-bundle-windows-x86_64-20140702/sdk/extras/google/google_play_services/libproject/google-play-services_lib
    

    但是我无法导出APK我在控制台中遇到以下错误:

        [2015-01-14 22:16:23 - MyGallery-master] Proguard returned with error code 1. See console
    [2015-01-14 22:16:23 - MyGallery-master] Warning: com.haarman.listviewanimations.BaseAdapterDecorator: can't find superclass or interface com.emilsjolander.components.stickylistheaders.StickyListHeadersAdapter
    [2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
    [2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
    [2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
    [2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
    [2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
    [2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
    [2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
    [2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
    [2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
    [2015-01-14 22:16:23 - MyGallery-master] Warning: com.haarman.listviewanimations.BaseAdapterDecorator: can't find referenced class com.emilsjolander.components.stickylistheaders.StickyListHeadersAdapter
    [2015-01-14 22:16:23 - MyGallery-master] Warning: com.haarman.listviewanimations.BaseAdapterDecorator: can't find referenced class com.emilsjolander.components.stickylistheaders.StickyListHeadersAdapter
    [2015-01-14 22:16:23 - MyGallery-master] Warning: com.haarman.listviewanimations.BaseAdapterDecorator: can't find referenced class com.emilsjolander.components.stickylistheaders.StickyListHeadersAdapter
    [2015-01-14 22:16:23 - MyGallery-master]       You should check if you need to specify additional program jars.
    [2015-01-14 22:16:23 - MyGallery-master] Warning: there were 13 unresolved references to classes or interfaces.
    [2015-01-14 22:16:23 - MyGallery-master]          You may need to specify additional library jars (using '-libraryjars').
    [2015-01-14 22:16:23 - MyGallery-master] java.io.IOException: Please correct the above warnings first.
    [2015-01-14 22:16:23 - MyGallery-master]    at proguard.Initializer.execute(Initializer.java:321)
    [2015-01-14 22:16:23 - MyGallery-master]    at proguard.ProGuard.initialize(ProGuard.java:211)
    [2015-01-14 22:16:23 - MyGallery-master]    at proguard.ProGuard.execute(ProGuard.java:86)
    [2015-01-14 22:16:23 - MyGallery-master]    at proguard.ProGuard.main(ProGuard.java:492)
    [2015-01-14 22:25:13 - MyGallery-master] Proguard returned with error code 1. See console
    [2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
    [2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
    [2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
    [2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
    [2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
    [2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
    [2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
    [2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
    [2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
    [2015-01-14 22:25:13 - MyGallery-master]       You should check if you need to specify additional program jars.
    [2015-01-14 22:25:13 - MyGallery-master] Warning: there were 9 unresolved references to classes or interfaces.
    [2015-01-14 22:25:13 - MyGallery-master]          You may need to specify additional library jars (using '-libraryjars').
    [2015-01-14 22:25:13 - MyGallery-master] java.io.IOException: Please correct the above warnings first.
    [2015-01-14 22:25:13 - MyGallery-master]    at proguard.Initializer.execute(Initializer.java:321)
    [2015-01-14 22:25:13 - MyGallery-master]    at proguard.ProGuard.initialize(ProGuard.java:211)
    [2015-01-14 22:25:13 - MyGallery-master]    at proguard.ProGuard.execute(ProGuard.java:86)
    [2015-01-14 22:25:13 - MyGallery-master]    at proguard.ProGuard.main(ProGuard.java:492)
    

1 个答案:

答案 0 :(得分:0)

对于ListViewAnimations,我在配置文件中添加了以下内容: -

-dontwarn com.nhaarman.listviewanimations.**

试一试,让我知道