Simple program gets "Cannot fit requested classes in a single dex file" when adding Firestore dependency

gets() function in c
gets function in c example
gets() function in c example
gets and puts function in c
implicit declaration of function gets
getchar() in c

I have a very simple program that runs fine--until I add the library dependencies to connect with Firestore. Specifically, when I add implementation '' to my app gradle. (Changing to an earlier 17.x.x version makes no difference). The error is "Cannot fit requested classes in a single dex file", which to me makes no sense since the program is so simple: no way I have more than 64K methods running.

Here is the MainActivity:

protected void onCreate(Bundle savedInstanceState) {

public void addUnitType(View view) {

} is activity_main.XML

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=""

        android:hint="Unit Type (MedSurg, ICU, etc)"
        app:layout_constraintTop_toTopOf="parent" />


...this is the project gradle

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {

    dependencies {
        classpath ''
        classpath ''
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files

allprojects {
    repositories {


task clean(type: Delete) {
    delete rootProject.buildDir

...this is the app gradle

apply plugin: ''

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.0"
    defaultConfig {
        applicationId "com.example.nofirestore"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), ''

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    **implementation ''**
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'androidx.cardview:cardview:1.0.0'

And again, this is the offending code in the app gradle--remove it and I am fine, put it in the dependencies and the compiling crashes:

implementation ''

and this the error

"Cannot fit requested classes in a single dex file"

Any thoughts on what gives? I have run much more complex apps without the need for multidex. I would love to know. Thank you.

Well, it was NOT the missing

apply plugin: ''

Instead, it was something as simple as the minSdkVersion19: changing that to 22 got rid of the multidex compiling error, and it runs fine!

GETS in C Programming, Gets in C Programming Example. The gets function used to read the complete set of characters from the console. This program will help you to understand this  gets () is used to take a single input at a time but can be used to input a complete sentence with spaces unlike scanf (). Below is a program on use of gets (). gets () takes only a single line at a time i.e all the words before hitting (enter key).

Updating the minSdkVersion to 22 in the app level build.gradle worked on its own. There was no need for me to enter the multiDexEnabled settings noted above.

fgets() and gets() in C language, with spaces, we can use either gets() or fgets() in C programming language. Example : Suppose we have a character array of 15 characters and input is  C gets () function. The gets () function enables the user to enter some characters followed by the enter key. All the characters entered by the user get stored in a character array. The null character is added to the array to make it a string. The gets () allows the user to enter the space-separated strings.

Inside the defaultConfig block add the following:

multiDexEnabled true

Also in the build.gradle add the following dependency:

implementation ''

You can check more information about multidex in the following link:

C gets() and puts(), C gets() and puts() functions with programming examples for beginners and professionals covering concepts, control statements. Let's see a simple program to  gets () : Reads characters from the standard input and stores them as a string. puts () : prints characters from the standard output.Just like printf statement.

Program to show usage of gets() function in C, Program on use of gets() function to input character in C language with output for practice and interview/exam preparation in C Language. I guess the reason is simple: you didn't halt/abort your program in the execs.That address 0xb76f2300 is on stack, so I suspect it is the return from the execs that fails when it tries to return to the value of the stored stack pointer.

C Programming Gets() Function Tutorial with Examples – POFTUT, Example. In this example, we will get the name from standard input and put into char array or string str then print with printf()  About GETS The Government Emergency Telecommunications Service (GETS) provides NS/EP personnel priority access and prioritized processing in the local and long distance segments of the landline networks, greatly increasing the probability of call completion.

C++ gets() - C++ Standard Library, The gets() function in C++ reads characters from stdin and stores them until a newline character is found or end of file occurs. Example: How gets() function works. #include <iostream> When you run the program, a possible output will be: name = gets. This next line is a little more involved. Let’s break it down. The gets method tells the computer to wait for input from the keyboard. This pauses the program, allowing the user to enter any text they want. The program will continue when the user presses the ENTER key on their keyboard.