Android app from Fire doesn't work with AppCompatActivity

I did simple testcase which depends on AppCompatLibrary.
I did simple app in Android Studio - there all works fine.
This is the simple App with main Activity - with one label and button.
I have references the same are added in Android Studio and checked all dependencies (3 are added to apk - the rest is added automatically - references are the same in Android Studio and ebuild (gradle process) but :
1.I cant set breakpoint in OnCreate - breakpoint is not resolved
2.view is not loaded(I can’t see label and button only white screen)
I inherited from AppCompatActivity

Test case below: (77.6 KB)

The second app is the same one but inherit from Activity
1.Breakpoint is working here
2.view is loaded (I can see label and button in main view)

Test case below: (2.4 MB)

Java simple app here : (486.2 KB)

So far on Windows environment (before aapt2) my all apps depend od these references and working fine.
This is the last test case I do because I’m trying to run apk from 2 weeks and have to publish it…
As I wrote in other thread before aapt2 apk is working in Elements. The same simple app is working on the same refereneces in Android Studio.

Can you check why when i inherit from AppCompatAcitivty i can’t debug and see my view in main activity. ?

I’m waiting for your answer.
If we will not run this simple app today- I have to leave your platform and rewrite my application in AS what for me is not acceptable.:frowning:
I think that when we will run this simple app in your tools I will manage to run my bigger app to…


To be clear — does OnCreate run but the breakpoint is not hit (ie debugger/debug-symbol bug), or is the issue that OnCreate never gets called?

Don’t know, because debug do not work. Please get it and checkit - run it with debug

My colleague will look into this and get back to you.

Is a chance today get back info?

My colleague is investigating.

Any info… ?
Can we take direct contact to your colleague ?
The client is getting impatient (because I have been trying to publish app for 2 weeks).

Best regards

@evgeny.karpov.jr will get back to you as soon as he has more info. i apologize for not being able to help more/quicker than we already are.

One immediate workaround might be to take the jar file of your app as compiled With Elements, add it to an (otherwise empty) Android Studio project, and buuikld the final distributable with that?

Are you talking about this apk generated in VS - working copy - on Fire I don’t have working copy of apk.

Not the .apk, the .jar. The Jar file is a regular java library that contains all your code. You can add it to a fresh/empty Android app in Android Studio as reference (and remove any conflicting code from that project), build it in AS, as you have your app, esentiallty.

We are talking about jar from Windows (there was only working apk and jar) ?
I didn’t do it something like this - have you got any simple testcase from android studio or maybe your colleague can prepare something like this?

Doesn’t really matter where you build it. As part of building your Android project. the actual compile happens, and it takes your Oxygen (or whatever) code and compiles it into a standard Java .jar binary file. It’ll be in the Obj folder, called “<yourprpjectyname>.jar”.

You created Android Stdio projects as part of testing earlier. Just do that, remove all the code from them (or at least make sure you don’t have, say, two "MainActrivity"s), and add the .jar from above as one of its dependent libraries. Add your resources, manifest, etc, and presto, done.

Sorry for long waiting. I tried reproduce it without any success, but I finally reproduced it. I will try to find solution today.

Are you saying that this simple app is working for you without any problems with appcomoatactivity?

It work for me same as with Activity. I’m not sure what I do to break it as your case, but now I try find problem with it.

Are you doing tests in Fire ? Which version?
Android studio version?
Build tools version?
Jdk version?
Java version?
Maybe somewhere here is a difference?

I’m using water. All programs last version, as I know.

AAPT2? It was not working under Visual Studio

We talked about it with Marc here :slight_smile:

And he suggests to go to Fire on Mac because aapt2 did, t work.
Can we run and test it for start in one environment?because we fight on many fronts…

I backed to VS - it doesn;t work - this simple APK - it was our starting point to investigate…we go to Fire … we are fighting with it above 2 weeks…
Can you give me your working testcase which can i run in VS ?