Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error #28

Open
LiviuSo opened this issue Dec 28, 2017 · 6 comments
Open

Compilation error #28

LiviuSo opened this issue Dec 28, 2017 · 6 comments

Comments

@LiviuSo
Copy link

LiviuSo commented Dec 28, 2017

val daily = dailyForecast.map { convertDayFromDomain(id, it) }

Where does the id come from?

@antoniolg
Copy link
Owner

It comes from the forecastList that is passed to with:

data class ForecastList(val id: Long, val city: String, val country: String,

@LiviuSo
Copy link
Author

LiviuSo commented Dec 29, 2017

Got it! My bad, sorry! Many thanks!

@Mnemoth42
Copy link

I'm in Android Studio 3.01... the program can't seem to find RecyclerView

Even copying and pasting the code from the git returns that RecyclerView cannot be found, and if you type import.android.support.v7.widget.RecyclerView, it doesn't autocomplete, nothing even close under widget... was it removed by chance?
Oddly, adding a RecyclerView to activity_main.xml works fine...

@Mnemoth42
Copy link

Ok... anybody who gets this problem, add the following to your build gradle (the app one):
implementation 'com.android.support:recyclerview-v7:26.1.0'
(You might have to change the version to match your current sdk). Once I did that, it worked. Go figure.

@antoniolg
Copy link
Owner

Yeah, to use the recyclerview you need to add that support library. It's explained at the beginning of chapter 5:

image

Was that your problem, or did you have to add also that line to make it work? In the past I've found myself having issues to get that library detected, solved by doing several project cleans.

@eliomaroun
Copy link

/com.example.user.weatherkotlin E/RecyclerView: No adapter attached; skipping layout
I followed your book step by step till chapter 15, and I tried to run the app on my Nexus 5.
I got an empty screen.
Can you help
Thanks in advance!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants