A
A
Activator_s2019-01-01 14:26:41
Android
Activator_s, 2019-01-01 14:26:41

How to resolve ExampleInstrumentedTest error when moving android project to release Android Studio?

Even the simplest one-line Hello world application (just created a project in Android Studio, didn’t add a single line of code) when translating Build Variants from debug to release ExampleInstrumentedTest immediately gives an error, and starting from the level:

import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;

screenshot: 5c2ba59595a68652802527.jpeg
Returning to debug - everything is fine again: 5c2ba5d28a6f3047910874.jpeg
In build.gradle (Module:App) lines
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

present, 5c2ba5ee83b9f078456526.jpeg
how could this be corrected? Or nothing needs to be fixed, as it should be, when moving from debug to release, some of the not very necessary Implementations and ExampleInstrumentedTest are removed and should not work? When I try to create an abb file for publication in PlayMarket, Android Studio warns of an error and is surprised that I do not want to fix it before publication.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question