使用方式
1.直接在app–>build.gradle 中引入依賴jar
debugCompile ‘com.amitshekhar.android:debug-db:1.0.0’
2.build程序
我這邊build時候出現問題
UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lcom/google/gson/JsonSerializer;
Gson mutidex衝突,原因就是項目中使用的jar和 debug-db 用的Gson 重複導致
compile ‘com.google.code.gson:gson:2.8.0’
解決方式,移除app->libs中的jar 保留Modul中的 Gson:2.8.0 重新Build 項目,就可以了,當然有其他解決方式,這裏只給出一個方式
運行
控制檯打出日誌如下:
04-01 16:11:23.894 31783-31783/D/DebugDB: Open http://172.27.35.14:8080 in your browser
使用瀏覽器, 輸入 http://172.27.35.14:8080 就可以查看了