1
resposta

Emulador não roda

Ao tentar rodar o emulador estou recebendo os sguintes erros:

ERROR:C:\Users\leode\AndroidStudioProjects\FinancasK\app\src\main\res\values\themes.xml:3:5-15:13: AAPT: error: resource color/white (aka br.com.gigatron.financask:color/white) not found. (6 desses)

 ERROR:C:\Users\leode\AndroidStudioProjects\FinancasK\app\src\main\res\values-night\themes.xml:3:5-15:13: AAPT: error: resource color/teal_200 (aka br.com.gigatron.financask:color/teal_200) not found. (2 desses)

Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.3.1-runtime (androidx.core:core:1.3.1) and support-compat-26.0.1-runtime (com.android.support:support-compat:26.0.1)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.3.1-runtime (androidx.core:core:1.3.1) and support-compat-26.0.1-runtime (com.android.support:support-compat:26.0.1)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.3.1-runtime (androidx.core:core:1.3.1) and support-compat-26.0.1-runtime (com.android.support:support-compat:26.0.1)
Duplicate class android.support.v4.os.IResultReceiver found in modules core-1.3.1-runtime (androidx.core:core:1.3.1) and support-compat-26.0.1-runtime (com.android.support:support-compat:26.0.1)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules core-1.3.1-runtime (androidx.core:core:1.3.1) and support-compat-26.0.1-runtime (com.android.support:support-compat:26.0.1)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules core-1.3.1-runtime (androidx.core:core:1.3.1) and support-compat-26.0.1-runtime (com.android.support:support-compat:26.0.1)
Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.3.1-runtime (androidx.core:core:1.3.1) and support-compat-26.0.1-runtime (com.android.support:support-compat:26.0.1)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.3.1-runtime (androidx.core:core:1.3.1) and support-compat-26.0.1-runtime (com.android.support:support-compat:26.0.1)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.3.1-runtime (androidx.core:core:1.3.1) and support-compat-26.0.1-runtime (com.android.support:support-compat:26.0.1)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.3.1-runtime (androidx.core:core:1.3.1) and support-compat-26.0.1-runtime (com.android.support:support-compat:26.0.1)

Go to the documentation to learn how to Fix dependency resolution errors.

Meu build.gradle(:app):

plugins {
    id 'com.android.application'
    id 'kotlin-android'
}

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "br.com.gigatron.financask"
        minSdkVersion 19
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.3.1'
    implementation 'com.android.support:appcompat-v7:26.0.1'
    implementation 'com.android.support:design:26.0.1'
    implementation 'com.android.support:cardview-v7:26.0.1'
    implementation 'com.github.clans:fab:1.6.4'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
1 resposta

Fala Leonardo, tudo bem ?

Cara como você está usando um projeto novo, que já utiliza os artefatos do androidx, todas as demais dependências devem seguir os mesmos artefatos.

No caso você está usando bibliotecas legadas.

Imagino que se você substituir todas dependências que estiverem do pacote de suporte, deva rolar.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software