Android Studio 2.1: error: package org.junit does not exist

前端 未结 7 1572
别那么骄傲
别那么骄傲 2020-12-29 23:58

Update: Its a bug and it\'s been reported, please star: https://code.google.com/p/android/issues/detail?id=209832&thanks=209832&ts=1463161330

<
7条回答
  •  别那么骄傲
    2020-12-30 00:46

    Download (junit-4.12.jar) from https://github.com/junit-team/junit4/wiki/Download-and-Install and copy it in your libs folder:(yourProjectFolder/app/libs)

    and then in build.gradle(Module: app) use this codes:

    dependencies {
    ...
    compile files('libs/junit-4.12.jar')
    ...
    }
    

    then rebuild your project.

提交回复
热议问题