8

Download the project of Google IO 2018 (iosched), try to compile it in Android Studio 3.3 Canary 7, also the probe in 3.2 RC1. But I get the following error:

error: resource style/TextAppearance.MaterialComponents.BottomNavigationView.Colored (aka com.google.samples.apps.iosched:style/TextAppearance.MaterialComponents.BottomNavigationView.Colored) not found.

Checking the file style. xml, it is observed that fails to find the style TextAppearance.MaterialComponents.BottomNavigationView.Colored.

<style name="TextAppearance.IOSched.BottomNavigationView" parent="@style/TextAppearance.MaterialComponents.BottomNavigationView.Colored">
        <item name="android:fontFamily">@font/google_sans</item>
        <item name="android:textColor">@color/bottom_nav_item</item>
</style>

Also check that the Google Material components dependency if implemented.

implementation "com.google.android.material:material:$rootProject.materialVersion"

I can't understand why it might be making this mistake.

Juanes30
  • 1,806
  • 2
  • 17
  • 31

3 Answers3

23

you can see here https://github.com/google/iosched/issues/285#issuecomment-416114763

you can use the Android Studio Stable 3.2

use the last dependencies.

in the file iosched/gradle.properties,mofiy

androidGradlePluginVersion = '3.2.0'
materialVersion = '1.0.0'
kotlinVersion = '1.2.51'

in the file iosched/mobile/src/main/res/values/styles.xml

change

@style/TextAppearance.MaterialComponents.BottomNavigationView.Colored

to

@style/Widget.MaterialComponents.BottomNavigationView.Colored
androidmalin
  • 844
  • 8
  • 11
  • 2
    I wonder why they don't update this kind of references while gradle plugin evolves... – GoRoS Oct 25 '18 at 11:28
0

with Android Studio 3.1.4 it builds, unless updating the outdated dependencies. there also is on open issue: https://github.com/google/iosched/issues/285 and it does complain much when building with ./gradlew build

once I've manually updated those beta01 versions to rc01 I also get that:

error: resource style/TextAppearance.MaterialComponents.BottomNavigationView.Colored (aka com.google.samples.apps.iosched:style/TextAppearance.MaterialComponents.BottomNavigationView.Colored) not found.

which basically means, that material-components-android is missing or outdated. to resolve this, you could simply copy the absent style from GitHub and manually add it into styles.xml or simply do not update that outdated library versions, until there is a final release of all those release candidates, which are not yet considered as "stable".

the bottom line may be, that it builds against materialVersion = '1.0.0-beta01' (which might contain that style), but not against materialVersion = '1.0.0-rc01' (which may lack that style).

maybe consider using a stable version of Android Studio, alike 3.1.4 - instead of using the canary channel and then complain it won't work; maybe you even build unknowingly against the rc01 version, because this is exactly the issue which I get when updating that library to rc01 - and the title of this question also boldly states RC01.

Martin Zeitler
  • 49,224
  • 12
  • 97
  • 156
0

I have managed to make it compile by installing android studio 3.2.0 beta 4.

as seen in the following image enter image description here

Juanes30
  • 1,806
  • 2
  • 17
  • 31