android - "can't find referenced class" with Proguard and Kotlin -
i having strange problem proguard , kotlin. gradually converting proguarded project kotlin - went fine far getting proguard errors when converting classes. not yet isolate special property of these classes breaks - seems no different other ones. example inputstreamwithsource just:
package org.ligi.passandroid.model import java.io.inputstream class inputstreamwithsource(val source: string, val inputstream: inputstream)
and works in ide - can deploy device - ui tests running fine. when trying assemblerelease project getting proguard errors not understand:
warning: org.ligi.passandroid.ui.fileunzipcontrollerspec: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.fileunzipcontrollerspec: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.inputstreamprovider: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.inputstreamprovider: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.inputstreamprovider: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.inputstreamprovider: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.inputstreamprovider: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.inputstreamprovider: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.passimportactivity$importandshowasynctask: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.passimportactivity$importandshowasynctask: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.passimportactivity$importandshowasynctask: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.passimportactivity$importandshowasynctask: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.passimportactivity$importandshowasynctask: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.passviewactivitybase$updateasync: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.passviewactivitybase$updateasync: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.passviewactivitybase$updateasync: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.searchpassesintentservice: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.unzippasscontroller: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.unzippasscontroller: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.unzippasscontroller$inputstreamunzipcontrollerspec: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.unzippasscontroller$inputstreamunzipcontrollerspec: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.unzippasscontroller$inputstreamunzipcontrollerspec: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.unzippasscontroller$inputstreamunzipcontrollerspec: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.unzippassdialog: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.unzippassdialog: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.unzippassdialog$1alertdialogupdater: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource warning: org.ligi.passandroid.ui.unzippassdialog$1alertdialogupdater: can't find referenced class org.ligi.passandroid.model.inputstreamwithsource
when add dontwarn these classes in proguard configuration crashes @ runtime - these classes removed - should not removed used.
i can work around problem adding keep class/enum these classes in proguard-config - question why needed these classes - imho should not needed
anyone has idea cause or how best investigate problem? full source here: https://github.com/ligi/passandroid
i make sure have own package defined in proguard - this:
-dontwarn org.ligi.passandroid.** -keep class org.ligi.passandroid.** { *; }
Comments
Post a Comment