首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >分级保护错误不反映-dontwarn。

分级保护错误不反映-dontwarn。
EN

Stack Overflow用户
提问于 2014-06-03 21:59:15
回答 1查看 4.1K关注 0票数 3

CLI上linux上的1.10级

./梯度清洁

./gradlew assembleRelease

标准错误..。

代码语言:javascript
运行
复制
    Note: there were 2 references to unknown classes.
          You should check your configuration for typos.
          (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)
    Note: there were 5 unresolved dynamic references to classes or interfaces.
          You should check if you need to specify additional program jars.
          (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
    Warning: there were 106 unresolved references to classes or interfaces.
             You may need to add missing library jars or update their versions.
:proguardRelease FAILED
:proguardRelease (Thread[main,5,main]) completed. Took 4.689 secs.

FAILURE: Build failed with an exception.

我扩展了一个与gradle捆绑的开放源码软件包,用于发布版本构建(添加了jackson.json,但不是来自maven中心)。

由于某些原因,Pro卫队正在抛出数百个“org.joda.time. class未找到”错误,尽管有以下代码片段:

代码语言:javascript
运行
复制
        release {
             runProguard true
             proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
         }   // in 'build.gradle'

-dontwarn android.support.**
-dontwarn org.joda.time.**
-dontwarn org.codehaus.jackson.**
-dontwarn ch.boye.httpclientandroidlib.**
-dontwarn org.apache.http.**
-dontwarn android.**
-dontwarn java.**
-dontwarn com.google.sample.castcompanionlibrary.**
-dontwarn org.w3c.dom.**
-dontwarn com.google.android.gms.maps.**

    #rcr adds
    -libraryjars  /usr/local/src/android-sdk-linux/platforms/android-19/android.jar
    -libraryjars <java.home>/lib/rt.jar
    -libraryjars libs/jackson-core-lgpl-1.9.2.jar
    -libraryjars libs/jackson-mapper-lgpl-1.9.2.jar
    -libraryjars libs/Parse-1.1.3.jar
    -libraryjars libs/httpclient-1.1.jar

“./gradlew assembleRelease”中的标准输出详细信息如下:

代码语言:javascript
运行
复制
    Initializing...
    Note: the configuration refers to the unknown class 'com.google.vending.licensing.ILicensingService'
    Note: the configuration refers to the unknown class 'com.android.vending.licensing.ILicensingService'
    Note: the configuration refers to the unknown class 'Object'
          Maybe you meant the fully qualified name 'java.lang.Object'?
    Warning: org.codehaus.jackson.map.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
    Warning: org.codehaus.jackson.map.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
    Warning: org.codehaus.jackson.map.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
    Warning: org.codehaus.jackson.map.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
    Warning: org.codehaus.jackson.map.ext.JodaDeserializers: can't find referenced class org.joda.time.DateTime
    Warning: org.codehaus.jackson.map.ext.JodaDeserializers: can't find referenced class org.joda.time.ReadableDateTime
    Warning: org.codehaus.jackson.map.ext.JodaDeserializers: can't find referenced class org.joda.time.ReadableInstant
    Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateMidnight
    Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateMidnight
    Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateMidnight
    Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateTime
    Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateTime
    Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateMidnight
    Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateTime
    Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateMidnight
    Warn

    ... 100s more in 'org.joda.time.**'

Note: android.support.v4.text.ICUCompatIcs: can't find dynamically referenced class libcore.icu.ICU
Note: com.google.android.gms.maps.internal.q: can't find dynamically referenced class com.google.android.gms.maps.internal.CreatorImplGmm6
Note: com.google.android.gms.maps.internal.q: can't find dynamically referenced class com.google.android.gms.maps.internal.CreatorImpl
Note: org.codehaus.jackson.map.deser.BasicDeserializerFactory: can't find dynamically referenced class java.util.ConcurrentNavigableMap
Note: org.codehaus.jackson.map.deser.BasicDeserializerFactory: can't find dynamically referenced class java.util.ConcurrentSkipListM

-dontwarn的保安向“org.joda”吐露说:“**”似乎不管用。

配置中有"-dontnote **ILicensingService“,这似乎不起作用。

com.google.android.gms.**的-dontwarn配置不起作用

java.util.**的-dontwarn不工作

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-06-03 22:20:34

-dontwarn标志的“代码段”在哪个文件中?看起来你从来没有告诉过你的build.gradle文件关于这个保护配置。

你有:

代码语言:javascript
运行
复制
proguardFile getDefaultProguardFile('proguard-android-optimize.txt')

但你也应该:

代码语言:javascript
运行
复制
proguardFile 'your_proguard_config.cfg'

因此它将同时使用默认的android配置和您的配置。

票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24025680

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档