I want to use the Jackson ObjectMapper library to parse JSON files for an android project in Android Studio.
I downloaded jackson-core-2.5.2.jar from this link: http://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.5.2/
Then I added the jar file to the ~/MyProject/app/libs folder, right clicked on it, and selected "Add as Library". I checked the build.gradle file in the app directory, and it has the line compile files('libs/jackson-core-2.5.2.jar')
. I cleaned and rebuilt the file, but the line
import com.fasterxml.jackson.databind.ObjectMapper;
Has databind
highlighted in red, and says that it cannot be resolved. I am confused, because the fact that it recognizes jackson
must mean that the library has been added to the app right? What am I doing wrong here?