HeadFirstAndroid icon indicating copy to clipboard operation
HeadFirstAndroid copied to clipboard

Android Studio changes to activity.xml and content.xml

Open senseworld opened this issue 9 years ago • 2 comments
trafficstars

Updates to Android studio have broken some of the chapter projects. Currently I am stuck on Chapter 9 bits and pizzas, as the theme changes cause the app to crash. I can't find any answers for getting themes and action bar working with the projects, and future chapters continue working on the bits and pizzas app. Short of waiting for a new version of the book to appear, how can the projects be adjusted for current versions of Android Studio?

senseworld avatar Oct 19 '16 20:10 senseworld

Do you have problems with the code on github, or is it code that was built through Android Studio? If so, did you create a Blank Activity or an Empty Activity? Later prints suggest using an Empty Activity to avoid this problem.

dogriffiths avatar Oct 19 '16 20:10 dogriffiths

Thanks for your follow-up. It was actually an older version of Android Studio that was giving me problems, I forgot I had downgraded. It was setting all activities up in AppCompat and generating two XML files for each activity, which diverges from the projects in the book. The newest version of Studio asks if you want to use AppCompat explicitly in its wizard.


From: David Griffiths [email protected] Sent: Wednesday, October 19, 2016 2:21:17 PM To: dogriffiths/HeadFirstAndroid Cc: senseworld; Author Subject: Re: [dogriffiths/HeadFirstAndroid] Android Studio changes to activity.xml and content.xml (#17)

Do you have problems with the code on github, or is it code that was built through Android Studio? If so, did you create a Blank Activity or an Empty Activity? Later prints suggest using an Empty Activity to avoid this problem.

You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/dogriffiths/HeadFirstAndroid/issues/17#issuecomment-254929058, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQ8tMxofXGAlrgFgzHhyevPP3-5cvd0aks5q1nu9gaJpZM4KbZ29.

senseworld avatar Oct 31 '16 21:10 senseworld