gradle - Android Proguard please correct the above warnings -
i'm developing application, have following proguard error:
error:execution failed task ':app:proguardrelease'. > java.io.ioexception: please correct above warnings first.
it refers to:
warning:there 162 unresolved references classes or interfaces.
so can't generate apk. seems problem happened when used multidexenabled in config. before (as remember) didn't error @ all.
here gradle settings:
apply plugin: 'com.android.application' apply plugin: 'com.neenbedankt.android-apt' android { compilesdkversion 21 buildtoolsversion "21.1.2" defaultconfig { applicationid "id2tel.nextgen" minsdkversion 14 targetsdkversion 21 versioncode 10 versionname "0.0.10" renderscripttargetapi 21 renderscriptsupportmodeenabled true multidexenabled true } buildtypes { release { minifyenabled true proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } packagingoptions { exclude 'meta-inf/license' exclude 'meta-inf/notice' exclude 'meta-inf/notice.txt' exclude 'meta-inf/license.txt' } } apt { arguments { resourcepackagename android.defaultconfig.applicationid androidmanifestfile variant.outputs[0].processresources.manifestfile } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:21.0.+' compile "com.android.support:support-v13:21.0.+" compile 'org.springframework.android:spring-android-rest-template:2.0.0.m1' compile 'com.fasterxml.jackson.core:jackson-databind:2.3.2' compile 'com.getbase:floatingactionbutton:1.8.0' apt 'com.squareup.dagger:dagger-compiler:1.1.0' compile 'com.squareup.dagger:dagger:1.1.0' androidtestcompile 'org.mockito:mockito-core:1.+' androidtestcompile 'com.google.dexmaker:dexmaker:1.0' androidtestcompile 'com.google.dexmaker:dexmaker-mockito:1.0' compile 'com.j256.ormlite:ormlite-android:4.45' compile 'com.astuetz:pagerslidingtabstrip:1.0.1' compile 'com.squareup.picasso:picasso:2.5.0' compile 'com.github.nkzawa:socket.io-client:0.3.0' compile 'com.koushikdutta.ion:ion:1.2.4' compile 'com.github.nkzawa:socket.io-client:0.3.0' compile 'jp.wasabeef:picasso-transformations:1.0.+' compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.2.+' compile 'com.pkmmte.view:circularimageview:1.1' compile 'com.google.android.gms:play-services:+' compile 'com.android.support:multidex:1.0.0' compile 'com.google.code.gson:gson:1.7.2' } repositories { maven { url 'http://repo.spring.io/milestone' jcenter() } }
here proguard config file:
-keep class com.fasterxml.** {*;} -dontwarn com.fasterxml.* -keep class com.squareup.** {*;} -dontwarn com.squareup.* -keep class org.springframework.** {*;} -dontwarn org.springframework.* -keep class org.json.** {*;} -dontwarn org.json.*
note: having code in proguard-rules or proguard-android doesn't change @ concerning error stack.
can me resolve problem?
edit : fullstack error:
warning:dependency org.json:json:20090211 ignored debug may conflicting internal version provided android. warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.map.objectmapper :app:collectreleasemultidexcomponents up-to-date warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.cache warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.map.objectmapper warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.map.objectmapper warning:org.springframework.http.converter.xml.simplexmlhttpmessageconverter: can't find referenced class org.simpleframework.xml.root :app:processreleasemanifest up-to-date warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.jsongenerator :app:preparejpcocyberagentandroidgpuimagegpuimagelibrary123library up-to-date warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.request warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.response (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass) warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.cachecontrol information:95 warnings :app:preparecomastuetzpagerslidingtabstrip101library up-to-date :app:preparecomgoogleandroidgmsplayservicesgcm730library up-to-date :app:mergereleaseresources up-to-date warning:org.springframework.http.converter.feed.abstractwirefeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.io.wirefeedinput warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.cachecontrol in case of problem, please repackage jarjar change class packages warning:com.fasterxml.jackson.databind.ext.domserializer: can't find referenced class org.w3c.dom.bootstrap.domimplementationregistry warning:org.springframework.http.converter.feed.abstractwirefeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.io.wirefeedinput :app:preparecomgoogleandroidgmsplayservicesads730library up-to-date :app:preparejpwasabeefpicassotransformations104library up-to-date warning:org.springframework.http.converter.feed.abstractwirefeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.io.wirefeedoutput warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.cachecontrol$builder warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.map.type.typefactory :app:preparecomandroidsupportmultidex100library up-to-date warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.jsonencoding warning:dependency org.json:json:20090211 ignored release may conflicting internal version provided android. warning:dependency org.json:json:20090211 ignored debug may conflicting internal version provided android. :app:compilereleaserenderscript up-to-date warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.response warning:dependency org.json:json:20090211 ignored release may conflicting internal version provided android. information:1 error warning:org.springframework.http.converter.feed.syndfeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.io.syndfeedoutput :app:generatereleasesources up-to-date in case of problem, please repackage jarjar change class packages warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.jsonprocessingexception warning:org.springframework.http.converter.feed.syndfeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.io.syndfeedinput warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.map.serializationconfig warning:org.springframework.http.converter.feed.syndfeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.io.syndfeedoutput :app:preparecomgoogleandroidgmsplayserviceswearable730library up-to-date warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.cachecontrol warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.jsonencoding :app:preparecomgoogleandroidgmsplayserviceslocation730library up-to-date may need add missing library jars or update versions. warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.call :app:preparecomgoogleandroidgmsplayservicescast730library up-to-date information:total time: 6.528 secs warning:org.springframework.http.converter.feed.abstractwirefeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.feed.wirefeed :app:generatereleasebuildconfig up-to-date information:build failed warning:org.springframework.http.converter.feed.abstractwirefeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.feed.wirefeed warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.okhttpclient warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.responsebody :app:preparereleasedependencies warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.responsebody warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.jsonprocessingexception warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.type.javatype :app:proguardrelease failed :app:preparecomgoogleandroidgmsplayservicesdrive730library up-to-date :app:preparecomgoogleandroidgmsplayservicesbase730library up-to-date :app:preparecomgoogleandroidgmsplayservicesgames730library up-to-date warning:org.springframework.http.converter.feed.syndfeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.syndfeed warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.response :app:compilereleaseaidl up-to-date warning:org.springframework.http.converter.xml.simplexmlhttpmessageconverter: can't find referenced class org.simpleframework.xml.serializer :app:preparecomgoogleandroidgmsplayservicesidentity730library up-to-date :app:checkreleasemanifest warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.jsonencoding :app:preparecomgoogleandroidgmsplayservicesfitness730library up-to-date warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.map.serializationconfig warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.map.objectmapper warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.request$builder warning:org.springframework.http.client.okhttprequestfactory: can't find referenced class com.squareup.okhttp.okhttpclient warning:org.springframework.http.converter.feed.syndfeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.syndfeed warning:org.springframework.http.converter.feed.abstractwirefeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.feed.wirefeed :app:compilereleasendk up-to-date warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.request$builder warning:org.springframework.http.client.okhttprequestfactory: can't find referenced class com.squareup.okhttp.okhttpclient warning:org.springframework.http.converter.feed.abstractwirefeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.io.feedexception warnings '-dontwarn' options. error:execution failed task ':app:proguardrelease'.
java.io.ioexception: please correct above warnings first. :app:processreleaseresources up-to-date :app:preparecomgoogleandroidgmsplayservicesmaps730library up-to-date warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.okhttpclient warning:org.springframework.http.converter.feed.syndfeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.io.feedexception :app:preparecomandroidsupportsupportv132103library up-to-date :app:compilereleasejava up-to-date warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.cache :app:preparecomgoogleandroidgmsplayservicesappstate730library up-to-date warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.responsebody in case of problem, please repackage jarjar change class packages warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.request$builder warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.map.type.typefactory :app:preparecomandroidsupportappcompatv72103library up-to-date warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.map.serializationconfig$feature warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.map.objectmapper warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.jsongenerator :app:prebuild warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.okhttpclient :app:predebugbuild :app:lintvitalrelease warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.okhttpclient warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.responsebody warning:there 162 unresolved references classes or interfaces. warning:org.springframework.http.converter.feed.syndfeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.io.syndfeedinput :app:preparecomgoogleandroidgmsplayservicesappinvite730library up-to-date warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.cachecontrol$builder warning:org.springframework.http.client.okhttprequestfactory: can't find referenced class com.squareup.okhttp.okurlfactory warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.response warning:org.springframework.http.converter.feed.syndfeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.syndfeed warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.cache :app:preparecompkmmteviewcircularimageview11library up-to-date warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.cache :app:preparecomgoogleandroidgmsplayservicesnearby730library up-to-date warning:org.springframework.http.converter.feed.rsschannelhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.feed.rss.channel warning:org.springframework.http.converter.feed.syndfeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.io.feedexception :app:preparecomgetbasefloatingactionbutton180library up-to-date warning:org.springframework.http.converter.feed.syndfeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.syndfeed warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.cachecontrol warning:org.springframework.http.converter.feed.abstractwirefeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.io.wirefeedoutput warning:org.springframework.http.converter.feed.syndfeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.syndfeed warning:org.springframework.http.converter.feed.abstractwirefeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.io.feedexception :app:generatereleaseassets up-to-date :app:preparecomgoogleandroidgmsplayserviceswallet730library up-to-date :app:preparecomandroidsupportsupportv42200library up-to-date :app:preparecomgoogleandroidgmsplayservicessafetynet730library up-to-date warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.type.javatype :app:preparecomgoogleandroidgmsplayservicesappindexing730library up-to-date warning:org.springframework.http.converter.feed.abstractwirefeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.io.feedexception warning:org.springframework.http.converter.feed.syndfeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.io.feedexception :app:mergereleaseassets up-to-date :app:preparecomgoogleandroidgmsplayservicesanalytics730library up-to-date warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.jsonencoding warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.response if code works fine without missing classes, can suppress :app:generatereleaseresources up-to-date :app:preparecomgoogleandroidgmsplayservices730library up-to-date warning:org.springframework.http.converter.feed.atomfeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.feed.atom.feed warning:org.springframework.http.converter.feed.abstractwirefeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.feed.wirefeed :app:preparecomgoogleandroidgmsplayservicesplus730library up-to-date :app:prereleasebuild :app:proguardrelease warning:org.springframework.http.converter.feed.syndfeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.feed.synd.syndfeed warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.jsongenerator :app:preparecomgoogleandroidgmsplayservicespanorama730library up-to-date :app:generatereleaseresvalues up-to-date information:see complete output in console warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.call warning:org.springframework.http.converter.xml.simplexmlhttpmessageconverter: can't find referenced class org.simpleframework.xml.core.persister warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.okhttpclient warning:org.springframework.http.converter.feed.abstractwirefeedhttpmessageconverter: can't find referenced class com.google.code.rome.android.repackaged.com.sun.syndication.feed.wirefeed warning:com.squareup.picasso.okhttpdownloader: can't find referenced class com.squareup.okhttp.cachecontrol$builder in case of problem, please repackage jarjar change class packages warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.map.serializationconfig$feature warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.jsonfactory warning:org.springframework.http.client.okhttprequestfactory: can't find referenced class com.squareup.okhttp.okurlfactory warning:org.springframework.http.converter.json.mappingjacksonhttpmessageconverter: can't find referenced class org.codehaus.jackson.jsonfactory
most of libraries need have own proguard dependency in proguard file. please, check documentation each library. , try see https://github.com/krschultz/android-proguard-snippets/tree/master/libraries . hope helps.
Comments
Post a Comment