Status Update
Comments
uc...@google.com <uc...@google.com> #2
Linking failed
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
/<Stripped Path>/app/src/main/res/layout/activity_main.xml:9: AAPT: error: attribute layout_behaviour (aka com.example.testlayout:layout_behaviour) not found.
error: failed linking file resources.
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
/<Stripped Path>/app/src/main/res/layout/activity_main.xml:9: AAPT: error: attribute layout_behaviour (aka com.example.testlayout:layout_behaviour) not found.
error: failed linking file resources.
as...@gmail.com <as...@gmail.com> #3
If it's Gradle issuse, then I tried with 5.2.1-all and same happens.
je...@google.com <je...@google.com> #4
it's an issue with your application, looks like you are referencing @string/appbar_scrolling_view_behavior but do not define it in your resources.
as...@gmail.com <as...@gmail.com> #5
No, the resource is within Android Library itself, and we implement it in xml by app:layout_behavior="@string/appbar_scrolling_view_behavior". But as of Android Studio 3.4-RC1, it seems to be fixed.:)
as...@gmail.com <as...@gmail.com> #6
I'm sorry but it seems to persist. I'm posting a xml layout:
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android "
xmlns:app="http://schemas.android.com/apk/res-auto "
xmlns:tools="http://schemas.android.com/tools ">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
style="@style/AppTheme.AppBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways|snap"
tools:title="@string/app_name" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/message_recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/message_selection_view"
android:shadowColor="@color/grey_800"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/dp_16"
android:visibility="invisible"
app:backgroundTint="@color/white"
app:rippleColor="?attr/colorControlHighlight"
app:srcCompat="@drawable/ic_cloud_upload"
app:tint="@color/colorAccent" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>
As you can see within the RecyclerView that I've used the string resource and it's giving me the error.
Gradle: gradle-5.2.1-all.zip
Project level:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0-rc01'
}
}
Modules:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'com.google.android.material:material:1.1.0-alpha04'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha02'
...
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="
xmlns:app="
xmlns:tools="
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
style="@style/AppTheme.AppBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways|snap"
tools:title="@string/app_name" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/message_recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/message_selection_view"
android:shadowColor="@color/grey_800"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/dp_16"
android:visibility="invisible"
app:backgroundTint="@color/white"
app:rippleColor="?attr/colorControlHighlight"
app:srcCompat="@drawable/ic_cloud_upload"
app:tint="@color/colorAccent" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>
As you can see within the RecyclerView that I've used the string resource and it's giving me the error.
Gradle: gradle-5.2.1-all.zip
Project level:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0-rc01'
}
}
Modules:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'com.google.android.material:material:1.1.0-alpha04'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha02'
...
as...@gmail.com <as...@gmail.com> #7
Another example of AS 3.4 RC 1:
<androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/progress_bar"
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="100"
android:progress="1"
android:progressTint="@color/colorPrimary" />
Error I'm getting: Can't resolve symbol '@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding'
Gradle: gradle-5.1.1-all
Dependencies are same as above. While with latest AS 3.3.2, I'm getting no such error and clicking it, takes me to Android's resource file of values.xml.
P.S. "looks like you are referencing @string/appbar_scrolling_view_behavior but do not define it in your resources.", I would like to add that it compiles perfectly!
<androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/progress_bar"
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="100"
android:progress="1"
android:progressTint="@color/colorPrimary" />
Error I'm getting: Can't resolve symbol '@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding'
Gradle: gradle-5.1.1-all
Dependencies are same as above. While with latest AS 3.3.2, I'm getting no such error and clicking it, takes me to Android's resource file of values.xml.
P.S. "looks like you are referencing @string/appbar_scrolling_view_behavior but do not define it in your resources.", I would like to add that it compiles perfectly!
Description
AI-183.5429.30.34.5310756, JRE 1.8.0_152-release-1343-b01x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080
Android Gradle Plugin: 3.4.0-beta05
Gradle: 5.1.1
NDK: from local.properties: (not specified); latest from SDK: (not found);
LLDB: pinned revision 3.1 not found; latest from SDK: (package not found);
CMake: from local.properties: (not specified); latest from SDK: (not found); from PATH: (not found);
Source: user_sentiment_feedback
Getting this error of "Unresolved class @string/appbar_scrolling_view_behavior".