Android App crash on startup on 2809 and with aapt2

Curious

D:                      Checking repository https://dl.google.com/dl/android/maven2
D:                      Package androidx.appcompat:appcompat found in repository https://dl.google.com/dl/android/maven2

that URL totally gives me a 404 here. Not just from Elements, but also in the web browser:

app is stared and later i got message in log

Message: Failed resolution of: Landroidx/appcompat/R$drawable;

^^^

But it is google standard package and app is
Very simple. Is it working on your machine?
I dont understand why before this aapt2 all works on my windows machineā€¦ I have working app builded in older versionā€¦

I dont know either, but the first thing is to look act the log to see if we can get the actual error messages! because chances are there is more einfor there than conveyed by that one line exception message.

Iā€™m not really set up to test that, right now.

I will try tomorrow with aar added to project wihout gradle process, we will see but today i have no power for itā€¦

1 Like

Doubt that will make a difference, FWIW.

But on windows i used gradle the same way like on Fireā€¦

Some difference must be somewhereā€¦ This is the simplest app i wrote like hello word but message didā€™t showā€¦ :grinning::grinning:

I will try of course to find out something more readable in log
But please try to run this simple app on your machine too

I donā€™t have something to run this on right now.

Hello Marc,
I did first simple app in android studio and second app in fire (I removed all unused refernces and I added only required - I saw them in first project in Android Studio.
Android Studio App built successfully and works fine in my physical android device.
The second app built in Fire crasch after start up. I searched in LogCat but I didnā€™ find any new message (only this one mentioned in Fire Log).
I did ebuild --dump for these applications.
They are below :
1.Fire
fire.txt (317.4 KB)
2.Android Studio
as.txt (286.6 KB)
One difference I saw is lack of R. in Fire app


I will not investigate more because i donā€™t have more knowledge (app is genereated in Ebuild process) ā†’ itā€™s beyond me.
This is only helpfull information from logcat :

That is all what can I do for you for this simple app.
Waiting for working Fire or any related info to help me build this simple app in Fire.
Best regards
Mateusz

Yeah so it really boils down to why does aapt2 not generate the R classes for all the packages, when aapt(1) didā€¦ :(.

Does this help?

or these

Marc Iā€™m investigating right now , I removed , dependecies, add dependencies one by one and I can only say that in simple apk with references added from Android Studio Fire doesnā€™t workā€¦
When i set in simple app AppCompatActivity something (app is starting but simple view is not loading) but i canā€™t debug oncreate - > breakpoin is not resolved,whe is inherited from AppCompatActivity when i inherit from Activity i can debug ā€¦ ā€¦ All things broked after migration to aapt2 and resources but as you know i test the sample simple application in Android Studio without any problemā€¦
I canā€™t search longer I have to rerwite application wroten in oxy in Android Studio and leave youtr tools after few years because I have no idea why something what worked so far doesnā€™t work now without my ingenuity (simple app canā€™t be complicated to run - have some added references mapped from Android Studio - once again but they are the same I have so farā€¦)
I loved your solution but when simple app doesnā€™t work what can I sayā€¦ I have no time to investigate moreā€¦ maybe I will rewrite it in AS in shorter timeā€¦
I checked dependencies and made very simple App in Fire without success but as I wrote with AppCompatActivity which is recomended by Google.
My library is based on AppCompatActivity and has been working so farā€¦
I have ready to use app generated in older version of RemObjects on Windows but without aapt2-> after migartion to Fire and trying to run aab my application doesnā€™t workā€¦
It is not acceptable especially because from 2 days Iā€™'m fighting with simple app based on AppCompatActivityā€¦ because I found that here is a problemā€¦
The worst thing is that dependencies hasnā€™t changed but I canā€™t run apk in Fire in new formatā€¦
Best regards
Mateusz

I removed all third party component. I leave only these needed for simple AppCompatActivty (google dependent) but it still doesnā€™t work in my environment.
I tried with simple app ā€¦ the simplest. I know

I should write that i wrote app using your tools for .net.core earlier wpf windows, ios, android but now it is the first time i cant resolve problemā€¦
Maybe I missed something but i compared to Android studioā€¦
I tried but i have to give up because I have no more timeā€¦

Question is can we not to use aapt2 generate apk in old format and later manually pack to aab?
As i know we canā€™t but maybe is any other way to generated and working apk pack into aab?

UseAapt has bene changed to hardcoded always be true, a while back. I donā€™t remember the details, but I wouldnā€™t have done that if it had not been necessary, so I think aapt can no longer be used.

As a workaround, try this: grab the R.java file for appcompat that Android Studio generates (or manually run aapt(1) on it to generate it), and just add it explicitly to your project.

R. Java for apocmpat from output AS?
Copy to my app folder?
Second question is why after changing to appcompatactivy in oncreate breikpoint is not resolved, can it be done by bad resources?
Activity works fine and I can debugā€¦