我已经将外部jar文件添加到mt项目的libs文件夹中,并在构建路径中对其进行配置.当我尝试"导出Android包"时,我收到许多未找到的引用类的Proguard错误消息,例如:警告:com.itextpdf.text.BaseColor:找不到引用的类java.awt.颜色
当我试图调试BaseColor类工作正常,所以我无法弄清楚为什么它警告我.
任何帮助将不胜感激,
谢谢
我已经使用Cling创建了应用程序并且工作正常但是当我创建发布版本时,我得到以下消息并且渲染器上没有任何内容:
11-22 16:24:53.341 20172-20172/? I/RendererCommand? TrackMetadata : TrackMetadata [id=1, title=IMG-20151120-WA0007, artist=, genre=, artURI=res=http://192.168.1.4:8089/1.jpg, itemClass=object.item.imageItem]
11-22 16:24:53.345 20172-20172/? V/RendererCommand? Resume
11-22 16:24:53.351 20172-20301/? W/RendererCommand? Fail to stop ! Error: Current state of service prevents invoking that action. Error writing request message. Can't transform message payload: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType. (HTTP response was: 500 Internal Server Error)
11-22 16:24:53.351 20172-20301/? I/RendererCommand? Set uri to http://192.168.1.4:8089/1.jpg
11-22 16:24:53.353 20172-20386/? D/RendererCommand? Update state !
11-22 16:24:53.354 20172-20264/? W/RendererCommand? Fail …Run Code Online (Sandbox Code Playgroud) 我似乎无法在没有警告的情况下编译.这是警告:
Warning:roboguice.activity.RoboMapActivity: can't find superclass or interface com.google.android.maps.MapActivity
Warning:roboguice.activity.RoboSherlockActivity: can't find superclass or interface com.actionbarsherlock.app.SherlockActivity
Warning:roboguice.activity.RoboSherlockFragmentActivity: can't find superclass or interface com.actionbarsherlock.app.SherlockFragmentActivity
Warning:roboguice.activity.RoboSherlockListActivity: can't find superclass or interface com.actionbarsherlock.app.SherlockListActivity
Warning:roboguice.activity.RoboSherlockPreferenceActivity: can't find superclass or interface com.actionbarsherlock.app.SherlockPreferenceActivity
Warning:roboguice.activity.SherlockAccountAuthenticatorActivity: can't find superclass or interface com.actionbarsherlock.app.SherlockActivity
Warning:roboguice.fragment.RoboSherlockDialogFragment: can't find superclass or interface com.actionbarsherlock.app.SherlockDialogFragment
Warning:roboguice.fragment.RoboSherlockFragment: can't find superclass or interface com.actionbarsherlock.app.SherlockFragment
Warning:roboguice.fragment.RoboSherlockListFragment: can't find superclass or interface com.actionbarsherlock.app.SherlockListFragment
Warning:org.roboguice.shaded.goole.common.cache.Striped64: can't find referenced class sun.misc.Unsafe
Warning:org.roboguice.shaded.goole.common.cache.Striped64$1: can't find referenced class sun.misc.Unsafe
Warning:org.roboguice.shaded.goole.common.cache.Striped64$Cell: can't find referenced …Run Code Online (Sandbox Code Playgroud) 在build.gradle我的项目中的一个模块是非常简单的:
apply plugin: 'com.android.library'
android {
compileSdkVersion 8
buildToolsVersion "21.1.2"
defaultConfig {
minSdkVersion 8
targetSdkVersion 8
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
}
}
dependencies {
compile project(':timsvc')
compile files('libs/jsoup-1.8.2.jar')
}
Run Code Online (Sandbox Code Playgroud)
但是,当我构建它时,它无法在外部库中找到符号jsoup-1.8.2.jar。
因为timsvc是我的一个模块,有自己的 build.gradle 和 proguard.cfg,我可以控制它的缩小级别,所以我没有任何问题。
但我不能这样做,jsoup-1.8.2.jar因为它是一个外部提供的罐子。
有没有办法将它从 Android Studio 中的 Proguard 中排除?
如果是这样,我该如何实现?