Android app doesn't run
-
wrote on 26 Dec 2023, 22:27 last edited by
Hi all -
I need to bump this, because I really need to get this app running on Android. I created a new, minimal project, and I'm still getting the error:
Error: Activity class {org.qtproject.example.minimal_map/org.qtproject.qt.android.bindings.QtActivity} does not exist.
I'm guessing it has something to do with my manifest file, and here's where I need help. I really don't understand most of the fields in this display:
So, a few questions:- the fields that look like: -- %%INSERT_APP_NAME%% --; am I supposed to replaceeverything with my own values, or do I keep the dashes and "%"?
- do I need to replace all of those fields?
- what exactly is an "activity name?" My searches haven't revealed much.
Thanks for any assistance...
-
Hi all -
I need to bump this, because I really need to get this app running on Android. I created a new, minimal project, and I'm still getting the error:
Error: Activity class {org.qtproject.example.minimal_map/org.qtproject.qt.android.bindings.QtActivity} does not exist.
I'm guessing it has something to do with my manifest file, and here's where I need help. I really don't understand most of the fields in this display:
So, a few questions:- the fields that look like: -- %%INSERT_APP_NAME%% --; am I supposed to replaceeverything with my own values, or do I keep the dashes and "%"?
- do I need to replace all of those fields?
- what exactly is an "activity name?" My searches haven't revealed much.
Thanks for any assistance...
@mzimmers said in Android app doesn't run:
the fields that look like: -- %%INSERT_APP_NAME%% --; am I supposed to replaceeverything with my own values, or do I keep the dashes and "%"?
do I need to replace all of those fields?if you don't replace the values, then QtCreator will fill this value. After building the project, you can go to the build dir, find the manifest and open to see what vaklues QtC inserted.
In my apps I always put my own value in, per ex. QtWS for the QtWorldSummit App.
if you change the value, switch editor to xml source to see that Application label (https://developer.android.com/guide/topics/manifest/application-element#label) and Activity label (https://developer.android.com/guide/topics/manifest/activity-element#label) changed.what exactly is an "activity name?" My searches haven't revealed much.
see above. simply search for "android manifest doc" -
Hi all -
I need to bump this, because I really need to get this app running on Android. I created a new, minimal project, and I'm still getting the error:
Error: Activity class {org.qtproject.example.minimal_map/org.qtproject.qt.android.bindings.QtActivity} does not exist.
I'm guessing it has something to do with my manifest file, and here's where I need help. I really don't understand most of the fields in this display:
So, a few questions:- the fields that look like: -- %%INSERT_APP_NAME%% --; am I supposed to replaceeverything with my own values, or do I keep the dashes and "%"?
- do I need to replace all of those fields?
- what exactly is an "activity name?" My searches haven't revealed much.
Thanks for any assistance...
@mzimmers said in Android app doesn't run:
I created a new, minimal project, and I'm still getting the error:
Quick sanity check: Do you get the error if create a new, minimal project and run it on Android without doing anything at all to the manifest file? In other words, just create the project and build + run it.
I'm guessing it has something to do with my manifest file, and here's where I need help. I really don't understand most of the fields in this display:
Be warned, that manifest editor is badly broken: https://bugreports.qt.io/browse/QTCREATORBUG-27119 I recommend that you don't touch it -- even the act of opening that editor is enough to corrupt the manifest file in some cases.
-
@mzimmers said in Android app doesn't run:
I created a new, minimal project, and I'm still getting the error:
Quick sanity check: Do you get the error if create a new, minimal project and run it on Android without doing anything at all to the manifest file? In other words, just create the project and build + run it.
I'm guessing it has something to do with my manifest file, and here's where I need help. I really don't understand most of the fields in this display:
Be warned, that manifest editor is badly broken: https://bugreports.qt.io/browse/QTCREATORBUG-27119 I recommend that you don't touch it -- even the act of opening that editor is enough to corrupt the manifest file in some cases.
@JKSH said in Android app doesn't run:
Be warned, that manifest editor is badly broken: https://bugreports.qt.io/browse/QTCREATORBUG-27119 I recommend that you don't touch it -- even the act of opening that editor is enough to corrupt the manifest file in some cases.
also have noticed that opening with Manifest Editor sometimes changes the content. But in my cases it was only a reformatting / reordering and nothing destroyed. (QtC 12.0.1)
BTW: I'm getting best experiences this way:
- Update Templates
- check changes (using git)
- add / replace with my settings
this way I'm always getting the newest recommended values
-
@JKSH said in Android app doesn't run:
Be warned, that manifest editor is badly broken: https://bugreports.qt.io/browse/QTCREATORBUG-27119 I recommend that you don't touch it -- even the act of opening that editor is enough to corrupt the manifest file in some cases.
also have noticed that opening with Manifest Editor sometimes changes the content. But in my cases it was only a reformatting / reordering and nothing destroyed. (QtC 12.0.1)
BTW: I'm getting best experiences this way:
- Update Templates
- check changes (using git)
- add / replace with my settings
this way I'm always getting the newest recommended values
wrote on 5 Jan 2024, 13:25 last edited by@ekkescorner said in Android app doesn't run:
check changes (using git)
Could you elaborate on this? Changes to what, exactly?
-
@ekkescorner said in Android app doesn't run:
check changes (using git)
Could you elaborate on this? Changes to what, exactly?
@mzimmers see here what I did while updating from 5.15 to 6.6:
https://t1p.de/ekkeAndroidTemplates66
this will give you the idea how I'm doing this -
@mzimmers said in Android app doesn't run:
I created a new, minimal project, and I'm still getting the error:
Quick sanity check: Do you get the error if create a new, minimal project and run it on Android without doing anything at all to the manifest file? In other words, just create the project and build + run it.
I'm guessing it has something to do with my manifest file, and here's where I need help. I really don't understand most of the fields in this display:
Be warned, that manifest editor is badly broken: https://bugreports.qt.io/browse/QTCREATORBUG-27119 I recommend that you don't touch it -- even the act of opening that editor is enough to corrupt the manifest file in some cases.
wrote on 5 Jan 2024, 15:27 last edited by@JKSH thanks for the warning about the manifest editor -- it looks like TQC has painted itself into a corner on this one.
I was going to try your suggestion, but now I have a different problem: my Android device shows as "disconnected" and I can't figure out what to do about this.
-
@mzimmers see here what I did while updating from 5.15 to 6.6:
https://t1p.de/ekkeAndroidTemplates66
this will give you the idea how I'm doing thiswrote on 5 Jan 2024, 15:28 last edited by@ekkescorner that's a great page. I'm using 6.5.3; do you think your suggestions will work with this version?
-
@ekkescorner that's a great page. I'm using 6.5.3; do you think your suggestions will work with this version?
@mzimmers will be similar, but not the same. per ex. the Qt FileProvider only exists in 6.6+
-
@JKSH thanks for the warning about the manifest editor -- it looks like TQC has painted itself into a corner on this one.
I was going to try your suggestion, but now I have a different problem: my Android device shows as "disconnected" and I can't figure out what to do about this.
@mzimmers said in Android app doesn't run:
my Android device shows as "disconnected"
connected via wifi or via usb cable ?
-
@JKSH thanks for the warning about the manifest editor -- it looks like TQC has painted itself into a corner on this one.
I was going to try your suggestion, but now I have a different problem: my Android device shows as "disconnected" and I can't figure out what to do about this.
-
@mzimmers said in Android app doesn't run:
my Android device shows as "disconnected"
connected via wifi or via usb cable ?
wrote on 5 Jan 2024, 15:50 last edited by@ekkescorner USB cable. I deleted that device, and am trying to create a new one, but it keeps trying to make an emulator, not a "real" Android device.
-
@ekkescorner USB cable. I deleted that device, and am trying to create a new one, but it keeps trying to make an emulator, not a "real" Android device.
@mzimmers creating devices is for emulators. to connect via USB see https://t1p.de/ekkeManageDevices
-
@mzimmers Click Manage Kits->Devices
select your device in Device combobox since your device may not be the default one.
Then click Debug above Run button and select your connected device.wrote on 5 Jan 2024, 15:56 last edited by@JoeCFD interesting -- I thought I had deleted that device, but it still shows up (and appears to be selected):
I'm not sure what you are referring to with "Debug above Run button." I'm only trying to build a release version. -
@mzimmers creating devices is for emulators. to connect via USB see https://t1p.de/ekkeManageDevices
wrote on 5 Jan 2024, 15:58 last edited by@ekkescorner oh, OK. I didn't realize that.
So...any idea why my device is showing as disconnected?
-
@ekkescorner oh, OK. I didn't realize that.
So...any idea why my device is showing as disconnected?
wrote on 5 Jan 2024, 15:59 last edited by JoeCFD 1 May 2024, 16:03@mzimmers click Devices and show the tabs. I am debugging my app for Android now and have debug build. If you are building release, then it is Release above Run button on the lower left corner of Qt Creator.
-
@mzimmers click Devices and show the tabs. I am debugging my app for Android now and have debug build. If you are building release, then it is Release above Run button on the lower left corner of Qt Creator.
-
@mzimmers is this device correct? Click the down arrow and you can see more.
If yes, check if the cable is on. I had this issue this morning. The cable was off. -
@JoeCFD it's the same device that worked for me last year. And it's indeed connected (I think it would have to be if it's auto-detected).
wrote on 5 Jan 2024, 16:20 last edited by JoeCFD 1 May 2024, 16:21@mzimmers Go to your computer and click this device to see if you are able to browse inside this device. For example, copy a file from this device to your computer. If yes, this means the device is connected to your computer. Otherwise, it is not connected.