編輯:關於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.
Android 開發筆記——通過 Intent 傳遞類對象,androidintentAndroid中Intent傳遞類對象提供了兩種方式一種是 通過實現Ser
Android 內存洩漏的一些情況。,android洩漏最近在維護代碼,發現一個自定義View(這個View是在一個AsyncTask的工作線程doInBackgroun
使用自定義的item、Adapter和AsyncTask、第三方開源框架PullToRefresh聯合使用實現自定義的下拉列表(從網絡加載圖片顯示在item中的Image
模仿輕仿蘑菇街應用源碼,仿蘑菇街源碼主要學習load頁面的逐幀動畫和補間動畫 源碼下載:http://code.662p.com/list/11_1.html[tr][t