How to debug Android emulator with ionic? - android

Using ionic, I am writing an app which I am trying to test with an Android emulator. I can successfully build and even add the app to the emulator but when I click the app it immediately dies before even loading the home page.
Is there anyway to debug this? I have tried running consolelogs and serverlogs but nothing is getting outputted. I have also tried debugging through Chrome (https://developer.chrome.com/devtools/docs/remote-debugging). But even though the device shows up in the list it does not have any of the options such as 'inspect', 'focus tab', 'reload', nor 'close'. It just displays the emulator's name.

Run adb logcat in a separate terminal.
As you run the emulator your terminal should populate with logs.

Related

Android Studio / Kotlin: cannot run app on an physical device ("Couldn't terminate the existing process for...")

I am new to Kotlin, and currently building my very first app (I am not experienced at all on the topic).
I successfully managed to customize my android phone and my android studio and achieved to launch the app I am currently working on a few times.
However, I now run into an error when trying to launch my app on my physical device. I get the following message: "Couldn't terminate the existing process for com.example.diceroller.", as if it was still running. The icons to launch/stop the app also seem to be in a state where the app is running on the device.
I have tried the following, without result:
close all running apps on the phone
reboot the phone
restart Android Studio
deactivate/reactivate USB debugging on the phone
The app does work fine on a virtual device.
Could you please give me any lead to follow to try and be able to test my app on a physical device? Thanks a lot!
Try to kill the daemon, open your terminal and write this
adb kill-server

Is it possible view entire logcat of Android device (i.e. not attached to a specific process)?

Simple question, but is it possible to view the entire logcat output of an Android device in Android Studio? Meaning all of the logs from everything that's happening on the device, not necessarily only those generated by the app in development.
I ask because I have a bug that does not show up on the debug build (i.e. I build it in Android studio and run it on a device), but it DOES show up in the production build for the same code, and I would love to see what is happening on the device.
Essentially, I'm asking if it's possible to select nothing from the following dropdown menu.
Use no filters option in your Android studio Logcat.
How you can select nothing in processes spinner:
Stop your application
Close the emulator
Press launch in android studio
Cancel launching the application
Emulator is still launching
You have no debuggable processes in your spinner.

Android Studio Logcat does not show errors

I am very upset about the Android Logcat.
I don't see errors when i run app from my phone.
Logcat doesn't show anything when i try to run an app, but then the app freezes on my smartphone and shuts down.
I cannot develop if logcat doesn't show me any error at all.
If the app runs corretly it will show up.
Things i did to try see an error in Logcat while developing:
Restarted computer
Restarted Android studio
Cleared every single filter from the Logcat in Android Studio
Executed adb kill-server
Uninstalled an application that i developed
I am very confused. I need to see a Logcat error to continue developing my application. At the moment i cannot continue developing. Please help me out of trouble!
Things i havent tried yet:
Reset my phone to factory settings
Have you tried to go to the device tab (where the devices and emulators are), click your device and then go to the logcat tab again?

Android studio, nothing comes in emulator on running app

I am trying to run the simple "Hello World" program in Android Studio for last two days but whenever i run the app, emulator opens but app doesn't even after waiting.
I tried a lot of things from internet but nothing worked. Please help me out or suggest some other alternative to run and test the app.
Sometimes the app does not launch automatically in the emulator.
In the emulator, open the app drawer (the screen where you can see all apps in the emulator) and see if your app is in the list of installed apps.
Otherwise, you're having another issue.
Note: I suggest that you use the Genymotion emulator. It is far better than the default Android emulator.

MonoDroid - Target Device does not display in IDE

I'm trying to run the very simplest app on MonoDroid though the MonoDevelop IDE - i.e. the one that is created as part of the new project (the one that increments the lable on button clicks - i won't post code as I don't think it is relevant unless someone really wants it).
When I press the run menu item then run (or debug) i get the emulator selection
I dutifully start the emulator - (I've tried API_7, API_10, API_12) and that works OK. But the IDE above never refreshes to show the currently running emulator so I can't launch the application. I have manually refreshed but the same list comes up. What I am expecting is the new emulator to appear in the list and the OK button becoming active.
I have tried running adb devices in the command line and I can see that the debug bridge has picked up the device i.e. it says emulator-5554 which matches the TCP/IP port that the emulator is running on.
I've also tried restarting the debug server i.e.
adb kill-server
adb restart-server
But I can't see the emulator appear on the above dialog. The debug server is running on port 5037. Could the IDE be listening to a different port?
Fundamentally I'm trying to get the simplest app running through MonoDevelop. And I'm failing. Please help good people.
I had the same problem initially when I tried running the emulators. My recommendations from my own experience would be to:
Run the Android SDK manager and retrieve all the latest SDK packages.
Create your own Android Virtual Device via the AVD Manager rather than running those that are listed when the IDE is intially run. You should then start the AVD manually via the AVD manager and ensure it is fully loaded before starting the de-bug.

Categories

Resources