使用浏览器查看Android SQLite数据库-Android Debug Database用法

使用方式

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 就可以查看了

猜你喜欢

转载自blog.csdn.net/u013110200/article/details/71216101