IntelliJ IDEA 13 EAP and Android SQLite Database

Posted on by Andrey Cheptsov

Great news for everyone waiting for more new features from the upcoming IntelliJ IDEA 13. Today we have rolled out IntelliJ IDEA 132.556, one more preview build with a number of bugfixes and new features.

One of the most important changes in the build is the long-awaited (by many Android developers) support for Android SQLite database. With the latest build you can explore and change device-embedded database directly from the IDE. 

Before you try it make sure that Database Support plugin is enabled. Then open Database tool window, click New button and choose Android SQLite Data Source.

You’ll see the following dialog:

The IDE automatically detects all databases available on the selected device for specified package. After you chose a database and pressed OK, the IDE will configure a data source. After that you’re able to browse the tables and edit its data using the database tools integrated into the IDE:

If you choose a data source in the tool window and press Synchronize, the IDE will check if the remote database has been changed and will download the changes from the device or emulator. Vice versa if you changed something locally, you can upload the changes to the device by pressing Upload from the popup menu.

A few notes on the new functionality:

  • It works only with devices and emulators based on Android 2.2 or higher.
  • It works with not-rooted devices too.
  • Installed application has to be built as debuggable. The IDE builds it in this way by default when you launch your app using run configuration. Accessing databases from production builds is not supported.
  • It works in IntelliJ IDEA Ultimate Edition only, since all database tools depend on Database Support plugin.

Find the full list of changes in Release Notes.

Feel free to share your feedback on our discussion forum and submit bug reports to the issue tracker.

Develop with Pleasure!

Comments below can no longer be edited.

23 Responses to IntelliJ IDEA 13 EAP and Android SQLite Database

  1. Ted Lafi says:

    October 8, 2013

    Will added this support also for Idea 12 ?

  2. ariel says:

    October 8, 2013

    Awesome!
    its on the same branch with Android Studio? or they will need to implement it themselves?

    • Andrey Cheptsov says:

      October 8, 2013

      Database Support plugin is a part of IntelliJ IDEA Ultimate only.

      • Nikolay says:

        October 13, 2013

        This sounds weird. Android Studio should be primary target for this feature.

        • Yasitha says:

          December 6, 2013

          Agree with Nikolay, There are enough database plugins available for eclipse freely, Why not include it on Idea Community Edition ?? 🙁
          Still this is one of main missing feature for me to migrate to idea from eclipse, since my apps highly use SQLite Databases.

      • François says:

        March 8, 2014

        If you have an Ultimate licence, is it possible to access to this feature from Android Studio ?

        • Andrey Cheptsov says:

          March 10, 2014

          Database tools are only available from Ultimate. But having a license that shouldn’t be a problem, should it?

  3. Emanuele Ricci says:

    October 8, 2013

    Why don’t you support rooted devices?

    • Andrey Cheptsov says:

      October 8, 2013

      We do support rooted devices.

  4. Andrei says:

    October 8, 2013

    I’ve been waiting for this for so long…

  5. Ivan says:

    October 9, 2013

    Can we use this awesome feature on Intellij 12.x ?

  6. Zaur says:

    November 24, 2013

    For those who couldn’t make it work please check http://youtrack.jetbrains.com/issue/IDEA-115319. This solved my problem.

  7. Stephen says:

    December 3, 2013

    Can you add this feature for AppCode too?!

  8. Adam says:

    January 25, 2014

    Are there any plans to open source this to the CE version of IntelliJ?

  9. Russell says:

    June 4, 2014

    In your post you mention an upload in the pop up menu to sync with the database of your android device or emulator. Just where exactly is it as i don’t see it in version 13.1.3

  10. Jakub says:

    August 5, 2014

    The plugin works great when the project doesn’t have flavors in Gradle. When I add flavors and have different package for each of them (to be able to install multiple flavors on 1 device), the plugin doesn’t allow me to select the flavored package names. If I write it down manually, it doesn’t accept it and reverts the field to the main package name specified in src/main/AndroidManifest.xml.

    I hope that makes sense.

    Thank you!

  11. Stephone Lee says:

    October 19, 2014

    It is show tips “Data Source Synchronization Error ,cannot synchronize dbName : run-as :Package packageName is unknow” ,when I created Android SQLite , I use Intellij Idea In MAC X OS

  12. Jan says:

    November 21, 2014

    Hello,
    what is the official way to use this feature for android developing? How to get it in androidStudio? or how to get google android studio features to IntelliJ IDEA Ultimate Edition?
    Any planned changes in close future ? Rummors ?
    Thanks…

    • Andrey Cheptsov says:

      November 25, 2014

      This feature is only available for IntelliJ IDEA Ultimate users.

  13. alex says:

    June 24, 2015

    What could be the reason of:
    Connection to Android SQLite failed
    java.sql.SQLException: path to ‘C:\Users\\.IntelliJIdea14\system\android\databases\\\internal\’: ‘C:\Users\\.IntelliJIdea14\system\android\databases\ does not exist
    folders are not creating and database is not downloading

    • Atreide says:

      July 8, 2015

      Same issue here …
      Even when i create manualy folders the file.db is empty

      • Stefan says:

        October 29, 2015

        Did you solve it? I have the same problem.

        IntelliJ 14.1.5
        Phone: Huawei P8 (GRA-L09 / Android 5.0.1)

Subscribe

Subscribe for updates