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 trialJonathan Grieve
Treehouse Moderator 91,253 PointsActivityHourlyForecastBinding not working in Android 3.1.2
I know I'm not the only one to have found some issues with this.
I've just spend the last few hours in Android Studio 3.1.2 trying to get this import statement to work.
import uk.co.jonniegrieve.stormy.databinding.ActivityHourlyForecastBinding;
I use the package uk.co.jonniegrieve.stormy
for this project.
I had tried the fixes suggested in this video but they don't seem to have any effect on the Java Class file.
Then, just as suddenly the code just seemed to work without showing up any errors in Android studio and I followed the video right up to compilation of the app. But this was clearly some sort of cruel trick by AS because when I ran the app, this error came up in the console.
error: duplicate attribute
Also at this point the R class isn't showing up correctly on the imports. I've given this my best shot but I'm out of ideas. HELP :)
2 Answers
Fahad Saleem
Courses Plus Student 10,786 PointsI'm also having the same issue, have you fixed it?
Jonathan Grieve
Treehouse Moderator 91,253 PointsJust to confirm I've deleted the repo for this project and started the project again from scratch. and to avoid confusion will be removing this thread shortly.
I've not yet been able to find a fix for this issue.
Jonathan Grieve
Treehouse Moderator 91,253 PointsHi Ken Alger
Are you able to suggest a solution to this if you have the time?
I've restarted my version of the project, this time starting from the project files in Video 1 of section 2 so I'm using the Treehouse package this time. I'm still unable to get the ActivityHourlyForecastBinding
import whether by quick fix or typing the import directly in.
The error is cannot resolve symbol: 'ActivityHourlyForecastBinding
Here's my latest repo. https://github.com/jg-digital-media/stormy_list_tth
Anyone else managed to solve this?
Jonathan Grieve
Treehouse Moderator 91,253 PointsJonathan Grieve
Treehouse Moderator 91,253 PointsIf I don#t hear soon I'll probably delete and restore the Repo to a working state and try again. I just wish I knew what I've done wrong so I can try and fix it.