Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJohn Corser
5,660 PointsIOUtils error in FileHelper.java after copying in the commons-io-2.4 lib (Android Studio)
I have downloaded the files from the teachers notes and included them, but even after including the .jar in my libs folder, IOUtils fails to import.
4 Answers
Bradley St John Jones
2,286 PointsA quick way to do this is to right click on the new lib file you added and click "add as library" which will be near the bottom.
It cleared everything up for me, including adding dependencies.
Hope that helps anyone else that gets stuck with this problem
haunguyen
14,985 PointsIn android Studio, press the "sync Gradle files" button that is located next to AVD manager Button.
shemar anderson
Courses Plus Student 688 PointsYou know ehat ur talking about man good job buddy
Lisa Steendam
6,825 PointsYour app/build.gradle file should contain a dependencies section that looks like this:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-v13:20.0.0'
compile files('libs/Parse-1.7.1.jar')
compile files('libs/bolts-android-1.1.3.jar')
compile files('libs/commons-io-2.4.jar')
}
The commons jar might not be included in yours yet.
Jaroslav Vankat
12,054 PointsHi,
I had the same problem, you just need to upgrade the gradle.build file. Try adding following line of code in dependencies.
compile fileTree(dir: 'libs', include: "commons-io-2.4.jar")
Tieryel Northwind
7,382 PointsTieryel Northwind
7,382 PointsNot sure if this helps but have you tried invalidating the cache and restarting?