Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find commons-codec.jar in Android Studio 3.0

I've installed Android Studio 3.0, once I open an app which ran perfectly on Android Studio 2.3.3, now when when I try building the app in Android Studio 3.0 it shows,

Error:Could not find commons-codec.jar (commons-codec:commons-codec:1.6). Searched in the following locations: file:/Applications/Android Studio.app/Contents/gradle/m2repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar

Help me resolve this issue.

like image 694
Syam Sundar K Avatar asked Oct 26 '17 03:10

Syam Sundar K


2 Answers

Solution is simple. Just follow these steps

1. Download commons-codec-1.6.jar file from here

2. Place this file in the following location

C:\Program Files\Android\Android Studio\gradle\m2repository\commons-codec\commons-codec\1.6\commons-codec-1.6.jar

DONE

like image 54
shivampip Avatar answered Oct 28 '22 15:10

shivampip


It seems you missed adding maven repo to your build.gradle file.

   buildscript {
repositories {
    ...
    // You need to add the following repository to download the
    // new plugin.
    google()
}

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0'
}
}

For more info on updating gradle follow Migrating to Gradle Plugin 3

like image 2
N.Moudgil Avatar answered Oct 28 '22 13:10

N.Moudgil