I think we need some clarifications here.
First, Android Studio is the
IDE. It's not part of the Android app. The only reason you'd have for the IDE to be connecting to a database is if you wanted to run SQL queries and commands as an IDE user. That is, as a "database explorer".
The app is a different matter. Android has a built-in database: SQLite. The API for that is well-documented.
As far as talking to external databases goes, that's a different matter. The standard for that is to use a JDBC driver. However, you have 2 problems there:
1. No database should be opening ports on the open Internet. That's what precipitated the infamous SQL Slammer debacle. So the only safe place to connect a mobile directly to a database is on an in-house LAN/WiFi network.
2. You cannot take just any old
Java JAR and import it into Android. Dalvik may look a lot like Java, but in the end, it
isn't Java. Dalvik doesn't have the complete set of classes that the standard JRE does, and even in classes that it does mirror from Java may not contain the full set of methods that actual Java does. And since the way you use JDBC is to make a driver JAR available to the application failure can be expected.
In practical terms, your best bet is generally to setup a web application with a ReST interface and have the Android app make ReST calls to it, so that the actual database interactions are done on the server, not in the mobile device. That way you don't need additional driver code in the mobile device and the amount of potential mayhen hackers can do is limited to what you allow through the ReST interface.
The ReST server can be in any language. I like NodeJS, but PHP, Python, even Enterprise Java are all suitable.