編輯:關於Android編程
使用jna的jar包時混淆編譯遇到了這個問題,就在上面列出了jna相關的警告。
需要在proguard-rules.pro中制定編譯規則,將jna相關包的警告忽略。
-keep class com.sun.jna.** { *; }
-dontwarn com.sun.jna.**
注意,如果是以module引入的,需要在主app中的proguard-rules.pro文件中忽略。
原文如下:
All the current answers to this question are just giving the Proguard rules that worked for them, every fix will be different. First off, confirm it’s a Proguard problem by checking that the classes-proguard directory is somewhere in the error message, something like this: Unable to compute hash of /Users/Documents/projectX/app/build/intermediates/classes-proguard/release/classes.jar
This means it’s caused by an earlier Proguard error so you need to scroll up in the Messages window or Gradle Console window and check what warnings or errors you’re getting. Just as an example, in my current project, Square’s Picasso library is causing the error: Warning: com.squareup.picasso.OkHttpDownloader: can’t find referenced class com.squareup.okhttp.OkHttpClient. I just added -dontwarn com.squareup.okhttp.** to ignore the warnings, and the app still worked as normal.
A lot of the Proguard errors will be warnings about some class so just adding -dontwarn for whatever class is causing it in your project often works.
ContentProvider為存儲和獲取數據提供統一的接口,它可以在不同的應用程序之間共享數據,本身就是適合進程間通信的。ContentProvider底層實現也是Bi
Android中可以創建三種對話框、確定取消對話框、單選對話框、多選對話框android中的確定取消對話框演示示例Android中使用單選對話框的演示案例android中
在Android中listview是最常用的控件之一,但是有時候我們會覺得千篇一律的listview看起來過於單調,於是就產生了listView動畫,listview加載
1、支持幾乎所有安卓版本,從安卓2.x~7.0安卓4.4、4.4.1和4.4.2是無法支持的,因為當時Google說WebView上傳文件不安全,就去掉了。所以這3個版本