Status Update
Comments
pr...@gmail.com <pr...@gmail.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.
ch...@gmail.com <ch...@gmail.com> #3
If it's Gradle issuse, then I tried with 5.2.1-all and same happens.
yb...@google.com <yb...@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.
ch...@gmail.com <ch...@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.:)
hu...@google.com <hu...@google.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'
...
ch...@gmail.com <ch...@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
Component used: Data Binding
Version used: 4.2.0-alpha05
Devices/Android versions reproduced on: Occurs at build time using Android Gradle Plugin 4.2.0-alpha05 + data binding compiler 4.2.0-alpha05. (Did not occur on alpha04)
Description:
I have an app that has a custom
@BindingAdapter
:I've been running 4.2.0-alpha04 successfully (both AGP and the data binding compiler). As soon as I update to 4.2.0-alpha05, any XML file that uses the BindingAdapter fails to generate its binding class. Example (partially redacted):
Removing the following line from a data binding layout's XML (a layout wrapped in
<layout></layout>
) fixes the error for the associated binding class:(hardcoded to
true
here to show it's not dependent on a missing import, or some other code.)