could you upload your repo to GitHub (or maybe Google Drive or whatever suits you) and also post the relevant part with the error message from LogCat, please?
Its easier to spot an error directly in the code than guessing from reported symptoms.
Thanks for your reply. As you can see I'm new in Android dev, then I don't know what is LogCat. Could you elaborate please ? Otherwise I'm going to attach code and screenshots. By the way the code is exactly the same as the book. So I guess I have a problem with my Android Studio Configuration. It's so frustrating because I understand the code in the book but I don't know why it doesn't run. Cheers !
no sweat - we're all somewhat "new" to Android, just because its evolving so fast that once you've learned something, they've already come up with something new, great and shiny, like Architecture Components!
OK, Logcat is the name for Android Studios built-in logging facility/monitor. You'll find the tab for its window panel at the bottom (by default) of the Android Studio "tool window bar":
Here you'll find all the warning-, error-, info-, debug-messages that every running app or Android itself might want to log. You'll learn somewhat later in the book how to make use of it, from within your own apps. It's a really helpful tool!
If your app encounters an error while its running, you'll typically find the stack trace that led to the error here.
In Logcat's upper right corner, you'll find a dropdown box that allows you to filter the source of these log outputs (because typically, there will be quite many, from other running apps as well as from the OS).
When you build and run your project in AS, it should default to "Show only selected application", i.e. your app.
Compile time errors, on the other hand, will be spit out by the build system (i.e. Gradle) into the Messages window, the tab for which you'll also find by default at the bottom of the tool window bar.
Clicking on an error there will get you into the respective line right in your source code.
Ok. Finally I have found the reason why it didn't work. I'm ashamed. I want to hide in a hole. Spinner was incorrectly written. spinner without upper case. AS didn't mention a problem with this tag. That's why I thought it was a different problem until I have discovered logcat thanks to @croworc. Thank you very much @croworc !!!
By the way, I don't understand why LinearLayout was underlined in red, and why for during one moment the urls was not accepted. . . Strange. But it's a happy end.
Good catch! That was certainly difficult, given that you're just starting out with Android and Android Studio! Hat Tip!
Btw: Looking at your screen prints, I noticed that you've been working with your layout in folder BeerAdviser/app/build/intermediates/res/merged/debug/layout/activity_find_beer.xml
This, however, is a path where Gradle will generate intermediate files - this isn't the location where you will work with your layout file(s). Generated files will be re-generated upon builds and your changes there would be discarded!
Your layout file(s) are located in: BeerAdviser/app/src/main/res/layout
On a side note: the current version of Android Studio is: Android Studio 3.0 Beta 5