0

Since updating Android Studio to version 1.4, baseGameUtils, which is a dependency of my project, fails to build. I'm guessing this is something to do with the new Theme editor as when opening the files which have errors a 'helpful' popup comes up saying that these generated files should not be manually edited and that I should be using the theme editor. baseGameUtils has no drawable resources, themes or styles so I have no idea why this problem even exists?

Gradle Build finished with 102 error(s)
:baseGameUtils:generateDebugResValues UP-TO-DATE
:baseGameUtils:generateDebugResources
:baseGameUtils:mergeDebugResources
:baseGameUtils:processDebugManifest UP-TO-DATE
:baseGameUtils:processDebugResources
D:\Android_Studio_Projects\SuperAwesomeProject\baseGameUtils\build\intermediates\exploded-aar\com.android.support\appcompat-v7\22.2.0\res\values-v21\values-v21.xml
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body1'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body2'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Caption'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display1'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display2'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display3'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display4'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Headline'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Inverse'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large.Inverse'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
......

Edit. After following the advice in the url linked to in the comment (AppCompat v7 r21 returning error in values.xml?) of changing compile-against to SDK 21 (why, why, why!!!) and Build Tools 21.0.2, GameHelper.Java no longer compiles, complaining that:

D:\Android_Studio_Projects\SuperAwesomeProject\baseGameUtils\src\main\java\com\google\example\games\basegameutils\GameHelper.java
Error:(32, 39) error: package com.google.android.gms.appstate does not exist
Error:(293, 28) error: cannot find symbol variable AppStateManager
Error:(294, 30) error: cannot find symbol variable AppStateManager
Community
  • 1
  • 1
LairdPleng
  • 948
  • 3
  • 9
  • 28

1 Answers1

1

Solution that appears to work of today (13 October 2015):

Change build.gradle in baseGameUtils to this:

apply plugin: 'com.android.library'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 19
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:support-v4:21.0.0'
    compile 'com.google.android.gms:play-services:+'
}

Replace GameHelper.java with the latest one found here.
Replace BaseGameActivity.java with the latest one found here.

Thank you Google for another wasted morning...

LairdPleng
  • 948
  • 3
  • 9
  • 28