How to view the table structure of the APP local database

We often use database local storage in our usual development, so we can't see the database table structure. If you want to see it, there is no way. Below I summarize the method of viewing the local database table structure in the app. The first is I recommend the most commonly used method.

Method 1: Export the database file in Android Studio and use SQLiteStudio to view it. SQLiteStudio can download and install it by itself.

1. There is a Device File Explorer in the lower right corner of Android Studio, click to open it, as shown in the figure below:

2. Expand the directory data -> data -> find your project package name -> expand databases->your database name. db is the database file, select it, right-click, Save As to export and save to the computer, and then open SQLiteStudio Just import it and you can view it

Method 2: View the local database table in the APP in the browser

Android Debug Database is a powerful library for debugging databases and shared preferences in Android applications.  
A plug-in for client databases and Sp files that can be viewed in the browser.

how to use:

1. Directly introduce the dependent jar in app-->build.gradle

debugCompile'' program

There are no problems when I build here. For common problems, please refer to this netizen;

UNEXPECTED TOP-LEVEL EXCEPTION: Multiple dex files define Lcom/google/gson/JsonSerializer;

Gson mutidex conflict, the reason is that the jar used in the project and the Gson used in debug-db are duplicated resulting in  

The solution is to remove the jar in app->libs and keep the Gson in Modul: 2.8.0. Rebuild the project and it will be fine. Of course, there are other solutions. Only one way to
run is given here.

The log output from the console is as follows:

04-21 16:14:51.495 21844-21844/com.tq.recorder D/DebugDB: Open in your browser

Use a browser, enter to view