I am new to Android Development and I am using Android Studio 0.8.9 with Gradle Version 1.12. I want to use the Commons Codec Library, specifically the Base64 class to call the method
encodeBase64URLSafe
I have download the latest commons-codec-1.9.jar file, added it to the created "libs" folder in Android Studio and then within build.gradle, I added the following:
dependencies {
compile 'com.android.support:support-v4:+'
compile files('libs/commons-codec-1.9.jar')
compile files('libs/guava-18.0.jar')
}
When I run my code, the app crashes and I get the following error message:
java.lang.NoSuchMethodError: Lorg/apache/commons/codec/binary/Base64;.encodeBase64URLSafe
I have no idea what is going on. I believe it has something to do with Android Studio not knowing the path of the commons-code jar library I added. However, it compiles without any issues.
If anyone can provide any insight, it would truly be appreciated.
Thanks!