HOME BLOG

Archive for the ‘Android Studio’ Category

How to inspect an Android app SQLite databases

Posted on: October 30th, 2020 by Olu No Comments

Hi folks,

In this post I talk about how to view an Android app’s SQLite database. You may need to do this for debugging purpose if develoing and Android app that stores data.

You can do this using Android Studio.

Go to View -> Tool Windows -> Device File Explorer.

In the Device File Explorer pane, navigate to dat/data/<your.app.package.name>/databases.

In here you should see three files for your database: one for the database, one for the -shm file and another for the -wal file. So if your database is called somedb in code, you would see files somedb-db, somedb-db-shm, somedb-db-wal. Cmd+click on all three files.

Then right-click and click Save As.

Select where to save them on your computer.

Once saved, you can open the main database on your computer using your favourite SQLite browser e.g. DB Browser for SQLite.

That’s all for now.

Happy software development.

 

 

How to fix error java.lang.OutOfMemoryError: Java heap space in Android Studio

Posted on: October 23rd, 2018 by Olu No Comments

Hi folks,

Here’s a quick tip on how to fix error java.lang.OutOfMemoryError: Java heap space when working with Android Studio.

Open gradle.properties,
find org.gradle.jvmargs
set -Xmx property to something bigger, e.g.
if you had -Xmx1500m, you can change it to -Xmx3000m

This way JVM uses max heap size of 3000MB
That’s all for now.
Happy coding.

How to fix NullPointerException RoboVmRunProfileState.startProcess error of RoboVM iOS not starting

Posted on: June 10th, 2018 by Olu No Comments

Hi folks,

Here I describe quickly how to fix a problem of RoboVM iOS not running on Android Studio. The error in question is one of the form:

Couldn't start application
java.lang.NullPointerException
 at org.robovm.idea.running.RoboVmRunProfileState.executeRun(RoboVmRunProfileState.java:57)
 at org.robovm.idea.running.RoboVmRunProfileState.startProcess(RoboVmRunProfileState.java:126)
...

 

According to a RoboVM issue page, the problem seems to be due to some FacetManager component markup present in ios.iml. The markup looks like:

 

<component name="FacetManager">
    <facet type="android-gradle" name="Android-Gradle">
      <configuration>
        <option name="GRADLE_PROJECT_PATH" value=":ios" />
      </configuration>
    </facet>
    <facet type="java-gradle" name="Java-Gradle">
      <configuration>
        <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
        <option name="BUILDABLE" value="true" />
      </configuration>
    </facet>
  </component>

 

Removing the markup solves the problem.

Till next time.