首页 > 解决方案 > 尝试在 Android Studio 的 Firebase 测试实验室上执行检测的 android 测试时,弹出“找不到应用程序的 Apk”的提示

问题描述

这是我拥有的模块的 build.gradle 文件。

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 28
    buildToolsVersion '29.0.2'

    defaultConfig {
        applicationId "com.example.android.testing.unittesting.basicunitandroidtest"
        minSdkVersion 28
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
}

dependencies {



    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.0'// Espresso
    def androidx_test_espresso = "3.1.0"
    androidTestImplementation "androidx.test.espresso:espresso-core:$androidx_test_espresso"
    androidTestImplementation "androidx.test.espresso:espresso-contrib:$androidx_test_espresso"
    implementation "androidx.test.espresso:espresso-idling-resource:$androidx_test_espresso"


    def androidx_test = "1.1.0"
    androidTestImplementation "androidx.test:runner:$androidx_test"
    androidTestImplementation "androidx.test:core:$androidx_test"
    androidTestImplementation "androidx.test.ext:junit-ktx:$androidx_test"

    implementation platform('com.google.firebase:firebase-bom:26.7.0')
    implementation 'com.google.firebase:firebase-analytics'

    
}

标签: androidfirebase-test-labinstrumented-test

解决方案


推荐阅读