java - :app:compileDebugUnitTestJavaWithJavac FAILED Android Studio -
i have searched degree on stack overflow etc try find answer question. have far been unable find solution works specific problem.
up until 5th of february, when ran command:
.\gradlew test
the command complete , build successful. today (7th), pulled changes teams remote repo. when ran command below output:
:app:prebuild up-to-date :app:predebugbuild up-to-date :app:checkdebugmanifest :app:prereleasebuild up-to-date :app:preparecomandroidsupportappcompatv72311library up-to-date :app:preparecomandroidsupportdesign2311library up-to-date :app:preparecomandroidsupportrecyclerviewv72311library up-to-date :app:preparecomandroidsupportsupportv42311library up-to-date :app:preparecomjourneyappszxingandroidembedded310library up-to-date :app:preparedebugdependencies :app:compiledebugaidl up-to-date :app:compiledebugrenderscript up-to-date :app:generatedebugbuildconfig up-to-date :app:generatedebugassets up-to-date :app:mergedebugassets up-to-date :app:generatedebugresvalues up-to-date :app:generatedebugresources up-to-date :app:mergedebugresources up-to-date :app:processdebugmanifest up-to-date :app:processdebugresources up-to-date :app:generatedebugsources up-to-date :app:compiledebugjavawithjavac up-to-date :app:predebugunittestbuild up-to-date :app:preparedebugunittestdependencies :app:compiledebugunittestjavawithjavac failed build failed total time: 5.804 secs
i created new branch see if figure out commit causing issue, however, when checked out commit knew did not contain issues (the commit had been at) , attempted run command similar output.
similarly used able right click on test file , select "run whatevertest.java" , test run.
now when attempt same thing following output:
!!! junit version 3.8 or later expected: java.lang.runtimeexception: stub! @ junit.runner.basetestrunner.<init>(basetestrunner.java:5) @ junit.textui.testrunner.<init>(testrunner.java:54) @ junit.textui.testrunner.<init>(testrunner.java:48) @ junit.textui.testrunner.<init>(testrunner.java:41) @ com.intellij.rt.execution.junit.junitstarter.junitversionchecks(junitstarter.java:191) @ com.intellij.rt.execution.junit.junitstarter.canworkwithjunitversion(junitstarter.java:174) @ com.intellij.rt.execution.junit.junitstarter.main(junitstarter.java:57) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ com.intellij.rt.execution.application.appmain.main(appmain.java:140) process finished exit code -3
now must select file , select "run..." run tile. run tests successfully.
i have attempted ususal build, clean restart computer etc. have attempted create java_home , android_java_home environment variable (under recommendation of similar questions).
since time thing sticks out me there java update. suspect may cause not certain.
i appreciate , can provide more details required.
thanks.
update
for more context here more of output .\gradlew test
* went wrong: execution failed task ':app:compiledebugunittestjavawithjavac'. > not find tools.jar
hopefully gives better context.
solved
problem solved uninstalling both java , android studio , reinstalling them.
i believe there path hidden somewhere in android studio unable change took reinstall me prompted select.
Comments
Post a Comment