Helo,
I have another problem with my app (with my own library dependency and google and third party).
App is running and before showing main activity I see !> Message: Failed resolution of: Landroidx/appcompat/R$drawable;
I made some smaller app and it works but I have to run this one (count of DEX files is different between projects smaller working has 55 dex appropriate 58 dex) but I don’t know what to do with this problem…
I should mention that this app before changing to aapt2 resources build and work fine on Windows machine , but as we know there (on Windows) is problem with aapt2 so I moved to Fire.
Could be many things. different versions of there referenced packages, aapt2 doing things slightly different, etc.
I dont see androidx.appcompat.R in either version, though. But I do see many other R classes that far win old, but not new. This might be as designed though, I vaguely recall an issue where we have loads of dupe R.java files (same content from each package) that caused problems, and that dropping them was the righty fix…
Can you post the entire crash log? usually there’s many nested exceptions hiding the real problem.
the IDEAL case would be if we had an identical project (same set of package references) that fails build with Elements, but works built with Android Studio, and we could compare the dump of tbose two…
Actually my bad androidx.appcopt.R is there in old, and not in new. So that could be the problem. I can go back and review why this was "fixed"and see if revering that solves it and.or causes more issues.
I’m afraid you have to look at logcat (add logcat in Terminal) and wade thru, literally, tens of thousands of bullshit messages to find the ones relevant to your process (filtering by your app name wont help, and that’ll lose you too much, but searching for it usually helps.
This strange error is coming from appcompatlib … the simple test case is located below inprax.pl.androidapplication.zip (88.5 KB)
If you change to Activity all works fine but for my application I use AppCompatActivity
Maybe I missed something in references but the same dependencies has been working until today and aapt2.
Mateusz
D: Checking repository https://dl.google.com/dl/android/maven2
HTTP Exception 'Error: ConnectFailure (No route to host)' trying to load 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/maven%2Dmetadata.xml'
D: Checking repository https://repo1.maven.org/maven2
D: Checking repository https://jcenter.bintray.com/
E: Gradle package androidx.appcompat:appcompat Version [1.2.0] not found in any repositories.
<- Task RemObjects.EBuild.Elements.ElementsProcessGradleReferences failed for inprax.pl.androidapplication, Cooper-Android, took 1.1153s (1.115s).
it looks like Google’s repo is down. indeed that url gives me a 404. yay.
-> Task RemObjects.EBuild.Elements.ElementsProcessGradleReferences started for inprax.pl.androidapplication, Cooper-Android.
section of your log, to see what URL it finds the package at? Rebuild should bypass your local cache and always try and get it remotely… Clearly/unfortunately I don’t have a copy in my local cache form earlier…