GeoQuiz (Listing 1.2) returns six errors, many exceptions

#1

Greetings,
I am running the latest Android Studio on Windows 7. I have 3.86 GB RAM available, and allocated 1.024 GB to HAXM. My AVD’s are all under 1 GB in size. My API = 22, and there is no option to lower it to 21 or any other value.

When trying to run the GeoQuiz xml code on page 11, I have the following issues:
Errors in the preview window:
"The following classes could not be instantiated:

  • android.support.v7.internal.widget.ActionBarOverlayLayout (Open Class, Show Exception, Clear Cache):

Here are the exceptions, which I copied from the stack:
java.lang.ClassNotFoundException: android.support.v4.view.ViewPropertyAnimatorListener
at org.jetbrains.android.uipreview.ModuleClassLoader.load(ModuleClassLoader.java:127)
at com.android.tools.idea.rendering.RenderClassLoader.findClass(RenderClassLoader.java:53)
at org.jetbrains.android.uipreview.ModuleClassLoader.findClass(ModuleClassLoader.java:84)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2585)
at java.lang.Class.getConstructor0(Class.java:2885)
at java.lang.Class.getConstructor(Class.java:1723)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:348)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:105)
at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:177)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:214)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:142)
at android.view.LayoutInflater.inflate(LayoutInflater.java:482)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at com.android.layoutlib.bridge.bars.BridgeActionBar.(BridgeActionBar.java:84)
at com.android.layoutlib.bridge.bars.AppCompatActionBar.(AppCompatActionBar.java:56)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.createActionBar(RenderSessionImpl.java:1691)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:362)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:321)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:497)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:485)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:894)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:485)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:590)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:644)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1700(AndroidLayoutPreviewToolWindowManager.java:79)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7$1.run(AndroidLayoutPreviewToolWindowManager.java:586)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:137)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7.run(AndroidLayoutPreviewToolWindowManager.java:581)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:351)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

The six errors listed in the Gradle build window:
Error:(3, 28) String types not allowed (at ‘layout_height’ with value ‘match+parent’).
Error:(11, 27) No resource found that matches the given name (at ‘text’ with value ‘@string/question_text’).
Error:(20, 40) String types not allowed (at ‘layout_height’ with value ‘wrap_contnt’).
Error:(21, 31) No resource found that matches the given name (at ‘text’ with value ‘@string/true_button’).
Error:(26, 31) No resource found that matches the given name (at ‘text’ with value ‘@string/false_button’).
Error:Execution failed for task ‘:app:processDebugResources’.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘C:\Users\Doug\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe’’ finished with non-zero exit value 1

Is there something wrong with my Studio? What do I need to do to run the app successfully? Thank You