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

前端 未结 7 1612
别那么骄傲
别那么骄傲 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:47

    I changed TestCompile to androidTestCompile and it's worked without problems.

    testCompile 'junit:junit:4.12'
    

    to

    androidTestCompile 'junit:junit:4.12'
    

提交回复
热议问题