마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

FAILURE: Build failed with an exception.

0 추천

이런 에러는 처음이라서 질문 드립니다. 

먼저 자바파일 중에 AndriodTest안에 instrumenredTest.Java 파일에서 에러가 발생합니다. 

빌드 아웃풋에 멘트는 아래의 참고글과 같고 코팅 영역 에서는 아래 그림1 과 같이 빨간색으로 에러가 떠있습니다.

안드로이드 스튜티오 버젼은 3.5.1입니다. 

아마 음성을 넣으면서 이런 애러가 발생한 것 같은데 도움 부탁드립니다 ㅜㅜ

두서없이 쓴 긴 글 읽어주셔서 감사합니다 ㅜㅜ

 

 

 

[그림1] 

import androidx.test.ext.junit.runners.AndroidJUnit4;
@RunWith(AndroidJUnit4.class)

 

[참고글(Output 에러 메세지)]

> Task :app:compileDebugAndroidTestJavaWithJavac FAILED
C:\Users\Public\RockPaperScissors\app\src\androidTest\java\com\example\rockpaperscissors\ExampleInstrumentedTest.java:6: error: package androidx.test.ext.junit.runners does not exist
import androidx.test.ext.junit.runners.AndroidJUnit4;
                                      ^
C:\Users\Public\RockPaperScissors\app\src\androidTest\java\com\example\rockpaperscissors\ExampleInstrumentedTest.java:18: error: cannot find symbol
@RunWith(AndroidJUnit4.class)
         ^
  symbol: class AndroidJUnit4
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugAndroidTestJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
23 actionable tasks: 16 executed, 7 up-to-date

익명사용자 님이 2019년 11월 4일 질문

답변 달기

· 글에 소스 코드 보기 좋게 넣는 법
· 질문에 대해 추가적인 질문이나 의견이 있으면 답변이 아니라 댓글로 달아주시기 바랍니다.
표시할 이름 (옵션):
개인정보: 당신의 이메일은 이 알림을 보내는데만 사용됩니다.
스팸 차단 검사:
스팸 검사를 다시 받지 않으려면 로그인하거나 혹은 가입 하세요.
...