Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Kevin Carroll3,432 Points
Self-Destruct App - FileHelper.java - IOUtils (cannot resolve symbol)
I am getting an error in FileHelper.java when I add it to my project - IOUtils cannot be resolved. I saw a couple other posts about this, but people seem to be able to restart their computer or IDE and then it suddenly works. No such luck for me.
Details: I am using Android Studios and the commons-io-2.4.jar file is in my library. I have cleaned and rebuilt the project, as well as restarted Android Studio and my computer. The error is still there.
I can confirm that Android Studio (and IntelliJ, which it's based on) do have issues with picking up changes to the build.gradle file. I often open the Gradle "tab" on the right side of the outer window frame, then press the "sync" button (not sure what these are called formally). My belief is that for performance, IJ parses and caches the content of build.gradle (Gradle likes to do this as well, but I think the problem here is IJ), and isn't being as good as it should be about watching for changes that might invalidate what it has cached.
Not sure if it'll help in your case, but try right-clicking on the .jar in your lib folder, and click "Add As Library" from the menu. This will automatically format the build.gradle file so it will include your library, and perhaps get rid of said problem!
Also be sure to check what package each .java file is pointing to. Mine defaulted as com.treehouse.ribbit, though my package name was com.example.kevin.ribbit -- changing it fixed some errors.