For the past week, I have been struggling to figure out how to run a Qt quick application with the Android kit. I have encountered numerous errors. Earlier, my OpenSSL settings on Android where not working, but I was able to fix it by downloading new OpenSSL files from online. After that, all the settings in Android settings have a checkmark to signify that they are working.
After that, I tried to run the program with the Android kit. However, unlike for you in the videos, Qt Creator did not auto detect an Android kit. In fact, I have uninstalled and reinstalled Qt numerous times to see if it would detect an Android kit. However, since this still did not work, I manually created my own kit. Here is a screenshot of what I filled out for it:
However, as you can see on the Qt version section, "Qt 5.15.0 for Android" is considered invalid. I have installed previous versions and the current version of Android numerous times on the Qt maintenance tool but all of them show as invalid. As a result, I changed the Qt version to "5.15.0 MinGW 32-bit".
When I tried to run the program, I got an error about not finding the gradle scripts. After researching, I found that since my Android SDK is past version 26.0.0, it is not downloaded with the SDK but should have been downloaded when I installed Qt. Since it clearly was not, and downgraded my version of Android SDK tools to one with the gradle scripts. There is still a green checkmark after it, so it was the correct SDK.
When I tried to run again, my Qt Creator crashes (meaning my laptop exits from Qt Creator immediately). As a result, I only try to build it. When I built it, I get the error that "Android deploy settings file not found, not building an APK. ". I tried researching the problem on the Qt forums and stack overflow but I could not find a valid solution. I continued to experiment more to get to the bottom of my problem.
Additionally, even before I run or do anything, when I start Qt, I get the following errors in general messages:
There are only 3 errors which seem to be repeated every couple of minutes. I have no idea what the some of the errors mean, but for the first one, I created a Android_NDK_ROOT environment variable, in the build settings for the project, Qt environment settings(tools->External->Configure->Environment->External Tools->Update Translations), and my Windows Environment variable settings and wrote "ANDROID_NDK_ROOT = ANDROID_NDK_ROOT=C:\Users\arjun\AppData\Local\Android\Sdk\ndk\21.3.6528147". However, even after all if this, my program still gave the same errors. Additionally, I could not figure out what the other two errors meant and choose to ignore them.
After this, I completely deleted my Qt Creator, and all the things I downloaded along with Qt. I then downloaded Qt. It basically did not change anything, except when I run it, I get a completely different error.
Here is the current state of errors and settings my Qt is in:
My Kits:
My Qt versions:
My manually created android kit:
Current compile output error:
Current Android settings:
Current general messages:
These are some file errors I have been getting randomly on Qt, usually when I try to run something. For the most part, I have been ignoring them and but they might be relevant to my problem. These come back to back, usually more at a time:
Issues I get when building:
In conclusion, my Qt is being difficult and I cannot seem to figure out how to run Android. I have followed all your instructions on the video as well as a lot more but I still cannot figure it out. Can you please help me fix the problem so that I can run Qt Applications on virtual android devices?
Thank You so much for your time and effort!
Related
Totally running out of ideas, the situation is depicted along with lots of logs over here: https://forum.qt.io/topic/121687/breakpoints-not-hit-on-android/5
The only reasonable error message within app log seems to be it:"Unable to find dynamic linker breakpoint function."
Sysroot set seems like tried many things already.
Here https://www.fayewilliams.com/2013/01/31/gdb-unable-to-find-dynamic-linker-breakpoint-function/
I've found information related to the error, still how do I proceed from here if the sysroot path is set corectly
*Update: I've reinstalled QT, Android SDK, QT Creator, still the same. I've uninstalled entire QT in hopes of removing all the seetings, the settings (ex. for kits survived).Spent day and a half on that one. I get an error for a new Hello World project. It's the same error. Ideas?
Here I described what worked for me in hopes that nobody else ever needs to go through all the stuff I went through before coming up with a solution. It wasted almost 2 of my work days. The first included reinstallation of everything to no avail. The second => spawning an entirely new Windows 10 VM and installing everything (100GB QT stuff and so on).
Guess what? on a new windows installation everything worked out-of the box.
So I took my time comparing all of the settings.
On the faulty system the CMake Tool was set to an external one (yes I updated CMake also) on the working system CMake is set to CMake(qt) AND what I THINK made the real difference is the CMake generator settings. On the working system it is set to Generator: Ninja , extra generator:none.
So to sum up how I made it work:
In your kit's setttings:
change CMake to CMake(qt)
Generator: Ninja , extra generator:none.
CLEAR the sysroot field (yes do it) and within the debugger settins also leave BOTH of the textual fields EMPTY
Bottom line? I DID NOT play around with these settings myself. EVER. And nobody else has access to this development machine. I have no idea what caused this.
Also I do not know why setting the sysroot field actually prevents this from working. If I set sysroot OR change generator from Ninja to something else, the error is back.
One more thing to fellow developers. Note that now there's a Start Debugging => Debug Without Deployment which allows to start debugging in matters of seconds in the new QT Creator.Side note: the error that there was no response from GDB for 20 seconds remains.
I've been working on a Xamarin project for a few days and have been testing it fine, but today it has suddenly stopped allowing me to debug the app, either via Live Player, or by connecting my smart phone via USB.
The only error I am getting, as far as I can see, is
Failed to debug your app
I've not got a way of testing it on iOS devices, but the built-in Windows Phone emulator runs the app fine, albeit with an error in my code popping up now and then.
What could be causing the Android version to stop debugging, or how do I at least fix it?
There are a couple of steps that can help with that issue:
Clean the solution and exit visual studio
manually delete the .vs folder in your solution directory
Delete the /obj and /bin folders in your shared code, and in each project for the platforms you are using
if you are developing for iOS, sometimes it helps to restart your mac
Start Visual Studio
Rebuild your shared code project
Rebuild every native project
Beyond that also make sure that you are using the latest versions of Visual Studio, Xamarin and Xamarin.Forms on all your computers, and that the nuGet Packages your project is using are at the very same version each in shared and native code
Also check, if your app isn't throwing an unexpected exception during its initialization. Especially if not caught, it can happen that your app crashes before your code gets executed at all.
In addition you may find further information about what is going on at Help -> Xamarin -> Open logs or in the device management in XCode (iOS only)
Try this :
Close visual studio if open.
Open App Data and then go to
(a) Local\Xamarin
(B) Local\Xamarin\Xamarin.Android
Empty these folders.
Open your project and then try to build your application.
Not a proper solution, but I uninstalled and reinstalled Visual Studio. This seems to have fixed the problem, but I've still no idea why it stopped working in the first place.
I'm trying to build an empty HaxePunk project for Android to test the build chain, and while I'm never getting any error, all my attemps have crashed at run time with the same error message :
Error: dlopen failed: cannot locate symbol "stpcpy" referenced by libzlib.so...
I am running the executable on a pretty old phone with Android 4.3 on it ; a Sony Xperia M.
I have been doing a bit of research, and so far I mostly see the same things being repeated : update your NDK (I've been using the latest one from the android dev website and not the one lime setup android downloads), build for previous API versions (which I am also doing with <config:android target-sdk-version="18" /> in my project.xml file). So I don't know what I'm doing wrong, if anything.
Another thing I found is that I'm using the git version of HXCPP, and when I built the Android libs with neko build.n android in the project subdir, it was using -DHXCPP_ANDROID_PLATFORM=26 whereas the Lime build of my project is using -DHXCPP_ANDROID_PLATFORM=9, so that can't be good. However, I don't really know much about Android at all, but I have read that the SDK version and Android platform are two different things, or so I've read.
Any help with this will be much appreciated.
EDIT : Okay so something weird happened : up until now I was trying to install the APK manually by copying it to my phone's files and launching it from there, which kept crashing. I tried lime test android once without changing anything at all and it worked fine, and from then I could manually install the APK like I used to, and the error never happened again. I can't replicate it, but it's still an open case.
I am getting started with developing an application for Android using Qt 5.8 and am running into issues running a basic application. When I run a basic application on an Android emulator, the application fails to load and a lot of errors are printed to the Qt console. Text file of errors
Images of Qt Creator, emulator, and errors
I followed tutorials online on getting the Android development environment set up, and as far as I know, I have the SDK, the NDK, Java, and ant all set up correctly.
From "create a project" in Qt, I selected the Qt Quick Control Application, and set the kit for Androidx86 and desktop. I basically kept the application as it came, but added a teal background and two text fields, but didn't change any code.
When I run the program for desktop, it works fine and opens as shown with clickable buttons and typeable text fields. But when I try to deploy the application on any emulated Android application on 7.1, the emulator boots properly but the app that displays is just this.
The error messages that show up in the Qt Designer are and here is a file dump of the whole list of errors that showed up from trying to run the app.
I am unable to figure out what these errors mean, as I installed Qt and the android files according to the documentation but still encountered these errors and was hoping someone would know what the issue was?
Probably related to the service change or similar (QtActivity etc.) Please check the following link. (Bug fixed and resolved) Fix version: 5.7.0 RC
https://bugreports.qt.io/browse/QTBUG-52373
I am new to Android development and Eclipse. I have been given an Android app and asked to make some simple changes to it. I can build the project and run it in the emulator, but I see some errors in the LogCat window in Eclipse.
I put aside the app I was given and wrote the Hello World app, following the Hello World tutorial on developer.android.com. With this simple app, I was surprised to see many errors and stack dumps in the LogCat window. I closed Eclipse and re-launched it. After waiting for Eclipse to finish initializing, LogCat was empty. Then I started the Hello World app by clicking the run button. After a while entries appeared in LogCat, including many errors.
With such a simple app, copied from the tutorial, I am guessing the errors arise from the development environment and/or virtual device rather than from the app itself, but I would like to be able to run apps without errors.
Is it a reasonable expectation to be able to run Android apps from Eclipse on an AVD without any errors? Or is it the state of the art that the development environment logs many errors and dumps stack traces even when everything is running "normally"?
If it is reasonable, I will pursue each error until I have cleaned up my environment and application. I would prefer this, as I would then know that if errors appear as I continue development, they arise from my application and must be fixed. On the other hand, I can't spend months developing Eclipse and the Android SDK. If I have to learn to live with logs full of error messages, I'll just ignore them unless something crashes.
Note that the Hello World application runs as expected - it appears to be working despite the errors.
I am running Eclipse Indigo SR2 and Android SDK ??? (I don't see a version number for the SDK - the installer is r18 and SDK Manager says there are no updates available) on Windows 7 Professional, 64bit. I am testing with Android 4.0.3.
Use either:
adb com.your.package:v
or in log cat on the side button (You may need to make this visible by pressing the button with two rectangles in it in log cat) press the plus button and then add an application filter