android studio - Junit error in newlly created Androidstudio 2.0 projects -


i'm sorry if question awkward because i'm novice programmer.

i use android studio 2, gradle 2.10 , windows 10. after create new project, gradle starts sync project.

after sync completes, enable "work offline" mode gradle in settings. sync happens again every new project create. when enable "work offline" receive error during build. how should solve problem?

error:(23, 17) failed resolve: junit:junit:4.12

the screenshot of build

just remove "testcompile junit:junit:4.12" build.gradle file:

dependencies {       compile filetree(dir: 'libs', include: ['*.jar'])      testcompile 'junit:junit:4.12'  //remove line , sync again... worked me       compile 'com.android.support:appcompat-v7:23.3.0'       compile 'com.android.support:support-v4:23.3.0'       compile 'com.android.support:design:23.3.0'       } 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -