Fixed
Status Update
Comments
as...@gmail.com <as...@gmail.com> #2
The problem persists in 3.4 RC 2
uc...@google.com <uc...@google.com> #3
Can you please share a sample a sample project to reproduce this issue.
as...@gmail.com <as...@gmail.com> #4
I was able to replicate `Unresolved class '@string/appbar_scrolling_view_behavior'` problem and was unable to replicate `Cannot resolve symbol '@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding'`.
For the second one, my main project is not showing any kind of error on AS 3.3.2, the file is on C:\Users\...\.gradle\caches\transforms-1\files-1.1\jetified-library-1.4.2.aar\gibberish\res\values. The main app compiles in both AS 3.3.2 and AS 3.4 RC 2, though it shows error for the latter one, but this app does not compile in any ASs.
For the first one, with this project, the xml file is on C:\Users\...\.gradle\caches\transforms-1\files-1.1\material-1.1.0-alpha04.aar\gibberish\res\values. AS 3.3.2 doesn't shows any error but AS 3.4 RC 2 does, but it compiles.
P.S. The app was last compiled with AS 3.3.2; Gradle: 4.10.3-all, 3.3.2. Please do recompile with appropriate gradle.
For the second one, my main project is not showing any kind of error on AS 3.3.2, the file is on C:\Users\...\.gradle\caches\transforms-1\files-1.1\jetified-library-1.4.2.aar\gibberish\res\values. The main app compiles in both AS 3.3.2 and AS 3.4 RC 2, though it shows error for the latter one, but this app does not compile in any ASs.
For the first one, with this project, the xml file is on C:\Users\...\.gradle\caches\transforms-1\files-1.1\material-1.1.0-alpha04.aar\gibberish\res\values. AS 3.3.2 doesn't shows any error but AS 3.4 RC 2 does, but it compiles.
P.S. The app was last compiled with AS 3.3.2; Gradle: 4.10.3-all, 3.3.2. Please do recompile with appropriate gradle.
as...@gmail.com <as...@gmail.com> #5
It showing the correct string value when collapsed but still giving the error `Unresolved class '@string/appbar_scrolling_view_behavior'`
uc...@google.com <uc...@google.com>
xa...@google.com <xa...@google.com>
be...@google.com <be...@google.com> #6
OK, so `Unresolved class '@string/appbar_scrolling_view_behavior'` is a proper bug that I can reproduce and will investigate. Thank you for the repro project! :)
@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding is just not defined in the project (the one you attached), I'm guessing it's supposed to come fromhttps://github.com/DreaminginCodeZH/MaterialProgressBar ? Adding this dependency to the project makes it build (and removes the warning from the XML editor as well).
@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding is just not defined in the project (the one you attached), I'm guessing it's supposed to come from
be...@google.com <be...@google.com> #7
The problem is our PackageClassConverter needs to (at least in certain cases) also recognize @string/foo references. I'll prepare the fix.
as...@gmail.com <as...@gmail.com> #8
To comment 6: I can confirm that I didn't add any external packages/libraries myself, may be, it came from any previous Material design package, which I cannot confirm or maybe from Firestore Auth package. But still, if "the app compiles" then the IDE shouldn't be showing the error, no? I may be wrong but I'm too new to all these, I'm just letting you know my opinion.
Also if it's the right place to say, but recently I "Invalidated caches" and "restarted". After AS started, my POJO classes were all messed up. For example, my pojo class is this:
class POJO {
int a;
int b;
}
file: pojo.java
After AS started, the pojo class had xml values instead, like:
<?xml version="1.0" encoding="utf-8"?>
<... some xml file... />
file was still pojo.java. Out of hyper-tension, I was trying different things and noticed that the app still compiles. Then I opened the same project in AS 3.3.2 and saw that everything is OK and the pojo class is still having it's original values. I deleted the settings folder of AS 3.4 and everything was normal after that. In the process, I forgot to take a screenshot which may have helped you to understand better what I'm saying :(.
Also if it's the right place to say, but recently I "Invalidated caches" and "restarted". After AS started, my POJO classes were all messed up. For example, my pojo class is this:
class POJO {
int a;
int b;
}
file: pojo.java
After AS started, the pojo class had xml values instead, like:
<?xml version="1.0" encoding="utf-8"?>
<... some xml file... />
file was still pojo.java. Out of hyper-tension, I was trying different things and noticed that the app still compiles. Then I opened the same project in AS 3.3.2 and saw that everything is OK and the pojo class is still having it's original values. I deleted the settings folder of AS 3.4 and everything was normal after that. In the process, I forgot to take a screenshot which may have helped you to understand better what I'm saying :(.
be...@google.com <be...@google.com> #9
"@string" references highlighted as errors inside layout_behavior is a bug that will be fixed in the next canary. I will close the bug once this change is merged.
About @style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding, AFAICT the project you attached doesn't compile, if you try to compile it you get "Android resource linking failed
/.../app/src/main/res/layout/activity_main.xml:29: error: resource style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding (aka com.blogspot.banglasms4u.asrc2:style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding) not found.
error: failed linking file resources." So this seems to be working as intended.
Please file a separate bug about strange artifacts added to your sources, I'm not sure I understood the issue, but it's not related to what this bug is about.
About @style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding, AFAICT the project you attached doesn't compile, if you try to compile it you get "Android resource linking failed
/.../app/src/main/res/layout/activity_main.xml:29: error: resource style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding (aka com.blogspot.banglasms4u.asrc2:style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding) not found.
error: failed linking file resources." So this seems to be working as intended.
Please file a separate bug about strange artifacts added to your sources, I'm not sure I understood the issue, but it's not related to what this bug is about.
as...@gmail.com <as...@gmail.com> #10
"I'm not sure I understood the issue", I know, only if I had taken the screen shot then I would have reported this bug. Thank you
be...@google.com <be...@google.com>
as...@gmail.com <as...@gmail.com> #11
Hello, this didn't got fixed in AS 3.4 RC 3 :(
as...@gmail.com <as...@gmail.com> #12
I would also like to add that in AS 3.5 Canary 10, this didn't got fixed as well.
be...@google.com <be...@google.com> #13
This fix should be included in the next 3.4 and 3.5 builds.
jl...@google.com <jl...@google.com> #14
Actually the next 3.4.1 and 3.5 builds.
[Deleted User] <[Deleted User]> #15
Still seeing this issue on both 3.4.1 and 3.5 beta 3.
App layout referencing a resource (style or drawable) that's defined in another module (that uses a resource prefix), shows up as "Cannot resolve symbol", but compiles/runs perfectly.
App layout referencing a resource (style or drawable) that's defined in another module (that uses a resource prefix), shows up as "Cannot resolve symbol", but compiles/runs perfectly.
be...@google.com <be...@google.com> #16
#15: can you file a separate bug and describe this scenario in details?
Description
AI-183.5429.30.34.5341121, 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-rc01
Gradle: 5.2.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
The version is 3.4 RC 1. The problem is same as it was with the beta release (
<?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" />
...
In `app:layout_behavior="@string/appbar_scrolling_view_behavior"` it's showing Unresolved class '@string/appbar_scrolling_view_behavior', while the app compiles perfectly.
Another example:
<androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/progressBar"
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progress_info" />
Here `style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding"` it's showing `Cannot resolve symbol '@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding'`. This is already defined within Android's default resources 'values.xml' and also the app compiles.
With AS 3.3.2, there are no errors.
Gradle 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'
...