Domiflichi
Domiflichi

Reputation: 85

Only getting -debug.apk file generating when building in Android Studio 3.5.3

I've never used Android Studio before until just recently. I installed the latest version, v3.5.3. I tried importing an old Eclipse project and got some errors and it seems that I have resolved all of those after much Googling.

My problem now (if it's even a problem) is that I can successfully build an .apk now, but it's getting named myappname-debug.apk and coming out in the 'debug' folder. This makes me think that I've got something configured wrong or am in debug mode or something. Is it normal for the app name to come out in the debug folder and the filename end in the word '-debug' like that?

Here is my build.gradle file:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

I keep reading things about run/debug configurations, but when I go into 'Run/Debug Configurations', am not 100% clear if I have things right. I never made any changes in there - all the configuration done must have been automatically by the import process. When I go into the 'Project Structure' menu, I see a 'release' and 'debug' Build Variant, so shouldn't that mean that I should be getting a 'myappname-release.apk' when I go to Build my APK?

Sorry if this is a stupid question, again, I'm completely new to Android Studio and haven't touched any kind of Android programming since back when it was done in Eclipse years ago.

Upvotes: 3

Views: 1311

Answers (1)

BierDav
BierDav

Reputation: 1404

Your problem is that you executed Build -> Build Bundle(s)/APK(s). That command builds your APK(s) unsigned (means not for the public so android studio puts it into the debug folder). That what you want to do is Build -> Generate Signed Bundle/APK. But you use that mainly for publishing.

Upvotes: 3

Related Questions