我用于编译我的 Android 应用程序的 Ant 脚本运行良好,但在将 Google Play 服务库更新到版本 5.0(修订版 18)后,ProGuard 失败并显示以下输出:
-obfuscate:
[mkdir] Created dir: /srv2/jenkins/jobs/CCNF Google only/workspace/trunk/org.digitalcure.ccnf.app/bin/proguard
[jar] Building jar: /srv2/jenkins/jobs/CCNF Google only/workspace/trunk/org.digitalcure.ccnf.app/bin/proguard/original.jar
[proguard] ProGuard, version 4.7
[proguard] Reading input...
[proguard] Reading program jar [/srv2/jenkins/jobs/CCNF Google only/workspace/trunk/org.digitalcure.ccnf.app/bin/proguard/original.jar]
[proguard] Reading program jar [/srv2/jenkins/jobs/CCNF Google only/workspace/trunk/org.digitalcure.android.common/bin/classes.jar]
[proguard] Reading program jar [/srv2/jenkins/jobs/CCNF Google only/workspace/trunk/google-play-services_lib/bin/classes.jar]
[proguard] Reading program jar [/srv2/jenkins/jobs/CCNF Google only/workspace/trunk/android-support-v7-appcompat/bin/classes.jar]
[proguard] Reading program jar [/srv2/jenkins/jobs/CCNF Google only/workspace/trunk/android-support-v7-appcompat/libs/android-support-v7-appcompat.jar]
[proguard] Reading program jar [/srv2/jenkins/jobs/CCNF Google only/workspace/trunk/android-support-v7-appcompat/libs/android-support-v4.jar]
[proguard] Reading program jar [/srv2/jenkins/jobs/CCNF Google only/workspace/trunk/google-play-services_lib/libs/google-play-services.jar]
[proguard] Reading library jar [/srv/jenkins/tools/android-sdk-linux/platforms/android-17/android.jar]
[proguard] Initializing...
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[proguard] Note: android.support.v4.app.NotificationCompatJellybean: can't find dynamically referenced class android.app.Notification$Action
[proguard] Note: android.support.v4.text.ICUCompatIcs: can't find dynamically referenced class libcore.icu.ICU
[proguard] Note: com.google.android.gms.maps.internal.u: can't find dynamically referenced class com.google.android.gms.maps.internal.CreatorImplGmm6
[proguard] Note: com.google.android.gms.maps.internal.u: can't find dynamically referenced class com.google.android.gms.maps.internal.CreatorImpl
[proguard] Note: the configuration refers to the unknown class 'com.google.vending.licensing.ILicensingService'
[proguard] Note: the configuration refers to the unknown class 'com.android.vending.licensing.ILicensingService'
[proguard] Note: the configuration refers to the unknown class 'Object'
[proguard] Maybe you meant the fully qualified name 'java.lang.Object'?
[proguard] Note: the configuration refers to the unknown class 'fqcn.of.javascript.interface.for.webview'
[proguard] Note: the configuration keeps the entry point 'com.google.ads.AdSize { AdSize(com.google.android.gms.ads.AdSize); }', but not the descriptor class 'com.google.android.gms.ads.AdSize'
[proguard] Note: the configuration keeps the entry point 'com.google.ads.mediation.admob.AdMobAdapter { com.google.android.gms.ads.AdRequest a(android.content.Context,com.google.android.gms.ads.mediation.MediationAdRequest,android.os.Bundle,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationAdRequest'
[proguard] Note: the configuration keeps the entry point 'com.google.ads.mediation.admob.AdMobAdapter { void requestBannerAd(android.content.Context,com.google.android.gms.ads.mediation.MediationBannerListener,android.os.Bundle,com.google.android.gms.ads.AdSize,com.google.android.gms.ads.mediation.MediationAdRequest,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationBannerListener'
[proguard] Note: the configuration keeps the entry point 'com.google.ads.mediation.admob.AdMobAdapter { void requestBannerAd(android.content.Context,com.google.android.gms.ads.mediation.MediationBannerListener,android.os.Bundle,com.google.android.gms.ads.AdSize,com.google.android.gms.ads.mediation.MediationAdRequest,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.AdSize'
[proguard] Note: the configuration keeps the entry point 'com.google.ads.mediation.admob.AdMobAdapter { void requestBannerAd(android.content.Context,com.google.android.gms.ads.mediation.MediationBannerListener,android.os.Bundle,com.google.android.gms.ads.AdSize,com.google.android.gms.ads.mediation.MediationAdRequest,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationAdRequest'
[proguard] Note: the configuration keeps the entry point 'com.google.ads.mediation.admob.AdMobAdapter { void requestInterstitialAd(android.content.Context,com.google.android.gms.ads.mediation.MediationInterstitialListener,android.os.Bundle,com.google.android.gms.ads.mediation.MediationAdRequest,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationInterstitialListener'
[proguard] Note: the configuration keeps the entry point 'com.google.ads.mediation.admob.AdMobAdapter { void requestInterstitialAd(android.content.Context,com.google.android.gms.ads.mediation.MediationInterstitialListener,android.os.Bundle,com.google.android.gms.ads.mediation.MediationAdRequest,android.os.Bundle); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationAdRequest'
[proguard] Note: the configuration keeps the entry point 'com.google.ads.mediation.admob.AdMobAdapter$a { AdMobAdapter$a(com.google.ads.mediation.admob.AdMobAdapter,com.google.android.gms.ads.mediation.MediationBannerListener); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationBannerListener'
[proguard] Note: the configuration keeps the entry point 'com.google.ads.mediation.admob.AdMobAdapter$b { AdMobAdapter$b(com.google.ads.mediation.admob.AdMobAdapter,com.google.android.gms.ads.mediation.MediationInterstitialListener); }', but not the descriptor class 'com.google.android.gms.ads.mediation.MediationInterstitialListener'
[proguard] Note: the configuration keeps the entry point 'com.google.ads.mediation.customevent.CustomEventAdapter { void requestBannerAd(com.google.ads.mediation.MediationBannerListener,android.app.Activity,com.google.ads.mediation.customevent.CustomEventServerParameters,com.google.ads.AdSize,com.google.ads.mediation.MediationAdRequest,com.google.android.gms.ads.mediation.customevent.CustomEventExtras); }', but not the descriptor class 'com.google.android.gms.ads.mediation.customevent.CustomEventExtras'
[proguard] Note: the configuration keeps the entry point 'com.google.ads.mediation.customevent.CustomEventAdapter { void requestInterstitialAd(com.google.ads.mediation.MediationInterstitialListener,android.app.Activity,com.google.ads.mediation.customevent.CustomEventServerParameters,com.google.ads.mediation.MediationAdRequest,com.google.android.gms.ads.mediation.customevent.CustomEventExtras); }', but not the descriptor class 'com.google.android.gms.ads.mediation.customevent.CustomEventExtras'
[proguard] Note: there were 4 references to unknown classes.
[proguard] You should check your configuration for typos.
[proguard] Note: there were 11 unkept descriptor classes in kept class members.
[proguard] You should consider explicitly keeping the mentioned classes
[proguard] (using '-keep').
[proguard] Note: there were 5 unresolved dynamic references to classes or interfaces.
[proguard] You should check if you need to specify additional program jars.
[proguard] Warning: there were 9 unresolved references to classes or interfaces.
[proguard] You may need to specify additional library jars (using '-libraryjars').
将它与以前的(工作)输出进行比较,以下几行是新的:
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[proguard] Note: android.support.v4.app.NotificationCompatJellybean: can't find dynamically referenced class android.app.Notification$Action
在输出的末尾加上错误信息。
发生了什么事? android.view.accessibility.CaptioningManager 似乎是在 API 级别 19 中引入的。
最佳答案
我注意到Android支持库的目标版本从16变成了19(同时更新到revision 20)。我的应用程序是针对目标版本 17 构建的。所以我将主应用程序项目的目标版本从 17 更改为 19,现在一切正常。就是这样!
关于android - 将 Google Play 服务更新到版本 5.0(修订版 18)后 ProGuard 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24757417/
我正在尝试使用ruby和Savon来使用网络服务。测试服务为http://www.webservicex.net/WS/WSDetails.aspx?WSID=9&CATID=2require'rubygems'require'savon'client=Savon::Client.new"http://www.webservicex.net/stockquote.asmx?WSDL"client.get_quotedo|soap|soap.body={:symbol=>"AAPL"}end返回SOAP异常。检查soap信封,在我看来soap请求没有正确的命名空间。任何人都可以建议我
我正在使用i18n从头开始构建一个多语言网络应用程序,虽然我自己可以处理一大堆yml文件,但我说的语言(非常)有限,最终我想寻求外部帮助帮助。我想知道这里是否有人在使用UI插件/gem(与django上的django-rosetta不同)来处理多个翻译器,其中一些翻译器不愿意或无法处理存储库中的100多个文件,处理语言数据。谢谢&问候,安德拉斯(如果您已经在rubyonrails-talk上遇到了这个问题,我们深表歉意) 最佳答案 有一个rails3branchofthetolkgem在github上。您可以通过在Gemfi
我想安装一个带有一些身份验证的私有(private)Rubygem服务器。我希望能够使用公共(public)Ubuntu服务器托管内部gem。我读到了http://docs.rubygems.org/read/chapter/18.但是那个没有身份验证-如我所见。然后我读到了https://github.com/cwninja/geminabox.但是当我使用基本身份验证(他们在他们的Wiki中有)时,它会提示从我的服务器获取源。所以。如何制作带有身份验证的私有(private)Rubygem服务器?这是不可能的吗?谢谢。编辑:Geminabox问题。我尝试“捆绑”以安装新的gem..
我看到这个错误:translationmissing:da.datetime.distance_in_words.about_x_hours我的语言环境文件:http://pastie.org/2944890我的看法:我已将其添加到我的application.rb中:config.i18n.load_path+=Dir[Rails.root.join('my','locales','*.{rb,yml}').to_s]config.i18n.default_locale=:da如果我删除I18配置,帮助程序会处理英语。更新:我在config/enviorments/devolpment
最近,当我启动我的Rails服务器时,我收到了一长串警告。虽然它不影响我的应用程序,但我想知道如何解决这些警告。我的估计是imagemagick以某种方式被调用了两次?当我在警告前后检查我的git日志时。我想知道如何解决这个问题。-bcrypt-ruby(3.1.2)-better_errors(1.0.1)+bcrypt(3.1.7)+bcrypt-ruby(3.1.5)-bcrypt(>=3.1.3)+better_errors(1.1.0)bcrypt和imagemagick有关系吗?/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ru
在Rails4.0.2中,我使用s3_direct_upload和aws-sdkgems直接为s3存储桶上传文件。在开发环境中它工作正常,但在生产环境中它会抛出如下错误,ActionView::Template::Error(noimplicitconversionofnilintoString)在View中,create_cv_url,:id=>"s3_uploader",:key=>"cv_uploads/{unique_id}/${filename}",:key_starts_with=>"cv_uploads/",:callback_param=>"cv[direct_uplo
我已经构建了一些serverspec代码来在多个主机上运行一组测试。问题是当任何测试失败时,测试会在当前主机停止。即使测试失败,我也希望它继续在所有主机上运行。Rakefile:namespace:specdotask:all=>hosts.map{|h|'spec:'+h.split('.')[0]}hosts.eachdo|host|begindesc"Runserverspecto#{host}"RSpec::Core::RakeTask.new(host)do|t|ENV['TARGET_HOST']=hostt.pattern="spec/cfengine3/*_spec.r
如果我使用ruby版本2.5.1和Rails版本2.3.18会怎样?我有基于rails2.3.18和ruby1.9.2p320构建的rails应用程序,我只想升级ruby的版本,而不是rails,这可能吗?我必须面对哪些挑战? 最佳答案 GitHub维护apublicfork它有针对旧Rails版本的分支,有各种变化,它们一直在运行。有一段时间,他们在较新的Ruby版本上运行较旧的Rails版本,而不是最初支持的版本,因此您可能会发现一些关于需要向后移植的有用提示。不过,他们现在已经有几年没有使用2.3了,所以充其量只能让更
我想在Ruby中创建一个用于开发目的的极其简单的Web服务器(不,不想使用现成的解决方案)。代码如下:#!/usr/bin/rubyrequire'socket'server=TCPServer.new('127.0.0.1',8080)whileconnection=server.acceptheaders=[]length=0whileline=connection.getsheaders想法是从命令行运行这个脚本,提供另一个脚本,它将在其标准输入上获取请求,并在其标准输出上返回完整的响应。到目前为止一切顺利,但事实证明这真的很脆弱,因为它在第二个请求上中断并出现错误:/usr/b
您如何在Rails中的实时服务器上进行有效调试,无论是在测试版/生产服务器上?我试过直接在服务器上修改文件,然后重启应用,但是修改好像没有生效,或者需要很长时间(缓存?)我也试过在本地做“脚本/服务器生产”,但是那很慢另一种选择是编码和部署,但效率很低。有人对他们如何有效地做到这一点有任何见解吗? 最佳答案 我会回答你的问题,即使我不同意这种热修补服务器代码的方式:)首先,你真的确定你已经重启了服务器吗?您可以通过跟踪日志文件来检查它。您更改的代码显示的View可能会被缓存。缓存页面位于tmp/cache文件夹下。您可以尝试手动删除