Goal: Display a list of books from the New York Time's Best Sellers list using Dagger 2 and the new Architecture components
- The New York Times books_api documentation here: https://developer.nytimes.com/
- Architecture Components documentation here: https://developer.android.com/topic/libraries/architecture/index.html
- Dagger 2 documentation here: https://google.github.io/dagger/
- Databinding documentation: https://developer.android.com/topic/libraries/data-binding/index.html
Add below snppet to your app.gradle file to enable DataBinding
android {
....
dataBinding {
enabled = true
}
}
- Muilti catagory support
- Add ROOM for offline usage.
- RXjava 2
- Unit Tests
- UI update
- Add Kotlin
The app crashes due to a NPE: The NPE is caused by an injection error by dagger 2:
Possible solutions
- https://google.github.io/dagger//android.html
- https://stackoverflow.com/questions/44651278/how-to-properly-use-dagger2-with-the-new-android-architecture-components
- https://stackoverflow.com/questions/44270577/android-lifecycle-library-viewmodel-using-dagger-2
- [Unlikely But Possible] Retrofit: incorrect netwrok request. Check that you have the headers right & the JSON to POJO model is correct