Android development - can Eclipse / AVD run error free? - android

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

Related

android studio emulator won't start/show up

I'm new to Android/Kotlin programming (not to programming in general) and I'm following the Kotlin Basics course on developer.android.com.
The very first lesson after having installed Android Studio is to create a Virtual Device and run an extremely basic app on it.
However I can't get the emulator to work. The very first time I tried, it opened a small window with a progress bar but it became unresponsive at around 1/4 progress and I had to eventually kill it.
Since then it just won't start/open.
After I click run, the code compiles and the Event Log within Android Studio says Executing tasks[...] then Gradle build finished[...] and that's it. Nothing happens beyond that and the Emulator window says "No emulators are currently running".
However:
Some emulator-related processes have been started. Those processes stay alive even after closing Android Studio..
If I try to start the AVD from within the device manager, I get an error message that the device is already running
I am unable to delete these .lock files without killing the aforementioned processes
What I could find:
The Windows Event Viewer shows an Application Error
The Android Studio log file also shows an Error
I don't know what to do with either of these messages, though
What I tried
Killing the emulator processes, removing the *.lock files and trying again.
Creating a different AVD (different device, different version of Android)
Completely reinstalling Android Studio and the SDK following the accepted answer to this question: How to completely uninstall Android Studio from windows(v10)?.
None of this had any effect.
I'm running Android Studio Arctic Fox (2020.3.1 Patch 4) on Windows 10 Pro (10.0.19042 Build 19042).
I am able to run the app on my actual phone but down the line I would like to be able to test apps on different types of devices or without having to always use my physical one.
All help would be greatly appreciated.
By running and emulator.exe command in a command prompt, I was able to see yet another error message, the same one as in this post: emulator: incompatible HAX module version 3 requirs minimum version 4, and the answer to that post from user Harold Sota (as well as the comment under it from Harun, more specific to my situation) solved the issue.

Android App Made in Qt Not Launching

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

running android emulator from worklight

I wish to run an application on android virtual device (I've created it). I right-click on the
Android project (which was created after I added the android environment) and choose "Run as Android Application". The emulator launches but it remains just a black window (and I wait a lot, nothing happens). Console writes "Build successful" and that's it. What might be the problem? API level is 18 (4.3). Platform Windows 7. Thanks.
Details: created a project, added hybrid application, added adaptors, deployed and run multiple times (just in browser), installed android in eclipse, added android environment, added AVD (had some old ones that didn't work, deleted them and created a new one following advises here).
It sounds like the problem is with your Android emulator.
First, can you start the emulator by itself, and see it work properly? You can start it from AVD itself. The emulator usually takes a long time to start, especially if you are running the ARM emulator instead of the x86 one.
If that works, can you run an empty Android app? You can go to File - New Project - Android Application Project, and after you create it, you should be able to run it and see an empty application.
If that works, can you try with an empty Worklight application? That way we can see if it is your specific application or something to do with Worklight.

trouble debugging and running sample android project

I installed the Android 2.2 SDK (2.2 is the version i have on my smartphone). I've tried running the NotePad sample project as an Android project. Here is what happens: the emulator loads, but when I click on the app, the screen goes blank. There are no errors being thrown. Has anyone else run into this problem? If so, how have you fixed it?
When you press run, the emulator loads AND the application should automatically open and run. Also, make sure there are no errors with the code itself.
If all else fails, try a new/ different SDK and make sure the app has no errors during it's installation into the SDK. Look at the Console and LogCat to make sure that there are no errors the emulator runs.

Android SDK emulator doesn't run my programs?

I recently got introduced to Android via a school course. Did some very simple examples earlier, and decided to installed all the required peripherals at my home computer too. I was on my way to develope all kind of cool stuff, until i noticed that something is wrong with my Android SDK or the emulator itself - it won't run any of the programs i try to.
I've got Eclipse & All the required add-ons / plugins installed. I get no error messages at any stage ( in eclipse or in the emulator itself ). Whenever i press run at Eclipse, the emulator takes it's time and starts up, but doesn't start the program, and doesn't actually show even the slightest hint of it. Looks just like if i had tried to start only the emulator. I've tried to create several different AVD's, and tried to use different versions of Android on them. No luck.
Im using windows 7 x64, and after a couple of rounds with Google, i found a few other guys who are having the same problem with the same OS.
Any help is greatly appreciated, as im running out of options here.
You need 32 bit eclipse and 32 bit JVM. There should be an error in the "console" window in eclipse if you hit run.
Click on the Menu button of the emulator to unlock it. You may then need to rerun the app.

Categories

Resources