看板 AndroidDev 關於我們 聯絡資訊
碰到一個奇怪的狀況 當使用debug build 由android studio直接安裝進手機或模擬器時, 都可以正常使用。 但切換成release build後,用產生的apk在手機上安裝並啟動 會出現support.v7.widget.SearchView.setSearchableInfo on a null object ref 的錯誤 請問為什麼這個問題在debug build不會出現呢? >> 謝謝L大解答 另外想請教,在release build,因為有proguard的效果, 系統會在奇怪的地方crash,Android Device Monitor也只能看到混淆後的code 請問這種狀況該如何Debug? >> proguard would generate a mapping file... 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.171.159.240 ※ 文章網址: https://www.ptt.cc/bbs/AndroidDev/M.1506605435.A.064.html ※ 編輯: walelile (1.171.159.240), 09/28/2017 21:38:04
lnmlee: debug 沒開混肴當然是正常的 proguard 改設 09/28 21:56
lnmlee: -keep class android.support.v7.** { *; } 09/28 21:56
lnmlee: -keep class android.support.v7.** { *; } 09/28 21:56
walelile: ok, thanks! 09/28 22:31
※ 編輯: walelile (1.171.159.240), 09/28/2017 22:37:54 ※ 編輯: walelile (1.171.159.240), 09/29/2017 01:12:02