build failed Google io 2018 (iosched)
Asked Answered
S

3

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.

Socialite answered 24/8, 2018 at 19:1 Comment(0)
S
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
Statuary answered 26/9, 2018 at 12:56 Comment(1)
I wonder why they don't update this kind of references while gradle plugin evolves...Metchnikoff
P
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.

Passover answered 25/8, 2018 at 7:29 Comment(2)
I'm not sure that's the problem, because I'm trying to make the project compile without modifying any dependency.Socialite
only can tell that I can build the project with Android Studio 3.1.4 and Gradle 4.4 ...Passover
S
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

Socialite answered 25/8, 2018 at 17:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.