android-gradle-plugin

Android Espresso test: Class not found: …Empty test suite

被刻印的时光 ゝ 提交于 2020-12-31 05:57:10
问题 I'm trying to implement things from this example - https://github.com/googlesamples/android-testing/tree/master/ui/espresso/BasicSample - into my app. When I try to execute the simple Espresso test, this happens: "/Applications/Android Studio 2.2.3.app/Contents/jre/jdk/Contents/Home/bin/java" (...) Process finished with exit code 1 Class not found: "com.faces_shop.app.MainActivityTest"Empty test suite. (copy-pasted from Android Studio) The test: package com.faces_shop.app; import android

Android Espresso test: Class not found: …Empty test suite

本小妞迷上赌 提交于 2020-12-31 05:56:07
问题 I'm trying to implement things from this example - https://github.com/googlesamples/android-testing/tree/master/ui/espresso/BasicSample - into my app. When I try to execute the simple Espresso test, this happens: "/Applications/Android Studio 2.2.3.app/Contents/jre/jdk/Contents/Home/bin/java" (...) Process finished with exit code 1 Class not found: "com.faces_shop.app.MainActivityTest"Empty test suite. (copy-pasted from Android Studio) The test: package com.faces_shop.app; import android

“RobolectricTestRunner.class” not recognized in Android Studio

不想你离开。 提交于 2020-12-30 05:36:02
问题 I'm trying to use Robolectric to run unit tests but the Android Studio is not recognizing the class on: @RunWith(RobolectricTestRunner.class) Details: classpath 'com.android.tools.build:gradle:3.0.0' And I'm importing dependency: testImplementation "org.robolectric:robolectric:3.5.1" And: android { testOptions { unitTests { includeAndroidResources = true } } } It simply does not appear option to import the class. Should I add any more dependencies I'm forgetting? Error: error: package org

“RobolectricTestRunner.class” not recognized in Android Studio

空扰寡人 提交于 2020-12-30 05:33:21
问题 I'm trying to use Robolectric to run unit tests but the Android Studio is not recognizing the class on: @RunWith(RobolectricTestRunner.class) Details: classpath 'com.android.tools.build:gradle:3.0.0' And I'm importing dependency: testImplementation "org.robolectric:robolectric:3.5.1" And: android { testOptions { unitTests { includeAndroidResources = true } } } It simply does not appear option to import the class. Should I add any more dependencies I'm forgetting? Error: error: package org

import kotlinx.android.synthetic.main.activity_main is not working

大兔子大兔子 提交于 2020-12-30 04:57:01
问题 Import kotlinx greyed out I think i try nearly everything. Reinstall Android Studio, Invalide Cache, new Project same Problem. i just can't find the Solution 回答1: Can you try File | Invalidate Caches / Restart Deleting .idea folder Clean Re-import the project OR just remove apply plugin: 'kotlin-android-extensions' , sync gradle plugin and then I added it again. 回答2: Check "build.gradle(:app)" file, plugins { id 'com.android.application' id 'kotlin-android' } if kotlin extension is missing,

import kotlinx.android.synthetic.main.activity_main is not working

时光毁灭记忆、已成空白 提交于 2020-12-30 04:55:35
问题 Import kotlinx greyed out I think i try nearly everything. Reinstall Android Studio, Invalide Cache, new Project same Problem. i just can't find the Solution 回答1: Can you try File | Invalidate Caches / Restart Deleting .idea folder Clean Re-import the project OR just remove apply plugin: 'kotlin-android-extensions' , sync gradle plugin and then I added it again. 回答2: Check "build.gradle(:app)" file, plugins { id 'com.android.application' id 'kotlin-android' } if kotlin extension is missing,

Active build variant does not have a test artifact

↘锁芯ラ 提交于 2020-12-29 11:49:09
问题 I have created a new build type called 'bitrise' based on the 'debug' build variant. The instrumented androidTests build and run fine when using the 'debug' build variant however when I switch over to my new 'bitrise' build variant I get the following errors: Process finished with exit code 1 Class not found: "com.mycompany.app.ui.race.RaceFragmentUiTest" And this warning when I select "Edit Configurations..." -> "Android Instrumented Tests" Versions 'com.android.tools.build:gradle:3.5.2'

Active build variant does not have a test artifact

烂漫一生 提交于 2020-12-29 11:47:29
问题 I have created a new build type called 'bitrise' based on the 'debug' build variant. The instrumented androidTests build and run fine when using the 'debug' build variant however when I switch over to my new 'bitrise' build variant I get the following errors: Process finished with exit code 1 Class not found: "com.mycompany.app.ui.race.RaceFragmentUiTest" And this warning when I select "Edit Configurations..." -> "Android Instrumented Tests" Versions 'com.android.tools.build:gradle:3.5.2'

Active build variant does not have a test artifact

こ雲淡風輕ζ 提交于 2020-12-29 11:45:23
问题 I have created a new build type called 'bitrise' based on the 'debug' build variant. The instrumented androidTests build and run fine when using the 'debug' build variant however when I switch over to my new 'bitrise' build variant I get the following errors: Process finished with exit code 1 Class not found: "com.mycompany.app.ui.race.RaceFragmentUiTest" And this warning when I select "Edit Configurations..." -> "Android Instrumented Tests" Versions 'com.android.tools.build:gradle:3.5.2'

difference between android gradle plugin and gradle

。_饼干妹妹 提交于 2020-12-29 09:27:09
问题 Android Studio 3.2 Canary 5 Build #AI-173.4630681, built on March 3, 2018 JRE: 1.8.0_152-release-1136-b01 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.15.4-300.fc27.x86_64 I have just started a new project and when I sync'd I got this dialog box. I am just wondering what is the difference between the Android Gradle Project and Gradle. How would I upgrade to Gradle to version 4.5? What is the purpose of both of these? Many thanks in advance 回答1: Even if you have written the