Unfortunately app has stopped Android emulator [duplicate] - adt

This is pretty simple: I'm using NetBeans on Linux with Android emulator 1.6. I have Logcat on my android phone, but the process of getting the messages to somewhere readable isn't smooth at all.
Can someone tell me how to get Logcat running on the emulator? Is there anything I can do to see debug messages other then having to copy the apk to my phone and testing it?
Thanks in advance!

You have a few options for viewing the debug log output, assuming you have the SDK installed and your command path set up correctly:
Type adb logcat. The log output from the connected device or running emulator will appear. I usually prefer adb logcat -v time to see the time stamps.
Type ddms. This launches the stand-alone version of DDMS. It has a logcat display at the bottom.
Install the ADT extension for Eclipse, and open the logcat view. (Since you're using NetBeans I assume this isn't what you want to do, but I'm mentioning it for completeness.)
In all cases, the interaction is the same whether you're using a physical device or software emulator, because the ADB daemon conceals the details. Whatever you're doing for the device is also expected to work for the emulator.
If you have a device and emulator connected simultaneously, you can use adb -e logcat for the emulator and adb -d logcat for the device. From stand-alone DDMS or Eclipse, just pick the device or emulator from the pop-up menu.

If you have setup nbandroid you can find the adb logcat viewer in netbeans under:
Window -> Output -> ADB Log
--edit
Just followed up on the post above and started using C:\Program Files (x86)\Android\android-sdk-windows\tools\ddms which is alot better then the one in netbeans.

The SDK comes with a handy tool called ddms it should be in the tools folder of the SDK.
At the moment an Emulator is running, or a mobile phone is connected to your machine it should show up in ddms and you can see all the log output in ddms.

Related

Dart DevTools showing "Connect to a running app"

I can't start the Dart Dev Tools in VS Code, when I launch in debugging mode it opens a chrome window says Connect to a running app
Enter a port or URL to a running Dart or Flutter application.
When I hover over the Dart DevTools button, it shows a port but I still can't connect to it.
Any ideas?
Start your flutter app with --observatory-port option. For example,
flutter run --observatory-port=9200
Once the app starts, you’ll see a message in your terminal that looks like:
An Observatory debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:9200/Swm0bjIe0ks=/
Paste the URL you got from running your app (http://127.0.0.1:9200/Swm0bjIe0ks=/) into the connect dialog to connect your app to DevTools.
Hope this helps.
On Visual Studio Code: click the letter (v) while the app is running. that's it!
In Run flutter in Terminal with port you want. It can 9200 or 9300 or 9301 etc
flutter run --observatory-port=9200
On the logcat you will see message look like
"An Observatory debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:9200/Swm0bjIe0ks=/"
After that copy and past url (http://127.0.0.1:9200/Swm0bjIe0ks=/) to dialog connect your app to DevTools
Hi run your app on emulator or real device.
On bottom of android studio you will find a run tab
on run tab there will be a message like below:
Debug service listening on ws://127.0.0.1:54675/CPu_ErpGRaw=/ws
copy (ws://127.0.0.1:54675/CPu_ErpGRaw=/ws) and paste it on Dart DevTools input field.
It will be connected to your running device or emulator
In my case the above answers did not work due I had another problem: PATH: the enviroment variables. This was because I couldn't execute flutter command in the terminal at my folder app project , so enviroment variables at system level it's necessary and I was doing this at user level for Windows. So I run flutter doctor o whatever to see if alredy the path was working and then I used the answer of #Hayeong Choi.

Error: there were deployment errors

When I tried to run any sample application or a new one it shows this error. Can anyone help please?
The error is telling you that you have not selected a device:
"Please select a valid device before running the application"
You need to choice a physical phone (or Android emulator) to deploy the application to.
Ref: Debug on Device
you have to have the android virtual device downloaded.
here are a few options:
Xamarin Android player
Bluestacks
Andy
Genymotion
Now that you have the virtual device. you need to start one before you run or debug.
The specific error you are seeing is because you've not started the device properly before you debug, you should be able to see the device.
Now run the project, and you wont meet this error.
This is because of Hyper V. Things you need to do are:
1.Turn off your Hyper V.(http://www.poweronplatforms.com/enable-disable-hyper-v-windows-10-8/)
2.Update your android SDK to desired platform.
That set. Now run your app. It will work.
Please let me know if still you have same error.
I would advise you to use the Visual Studio Emulator for Android (get it here), it plays very nice with Xamarin and Visual Studio and sets up your system automatically. As an added benefit it is very fast!

Issue setting up the development environment for ProjectTango developemnt Device

I have a Project Tango development Kit. I am interested in working on the depth data from the sensors.
I have ADB setup on my machine. But the Eclipse android emulator doesn't detect the Tango Development tablet.
Can anyone suggest me how to set things up for the device!.
Thank you in advance.
Please ensure that USB debugging is enabled in order to enter ADB, go to Settings > About tablet > Build number and then press Build number seven times. Then press back and go to Developer options > USB debugging.
Go to your device manager (if on Windows) and look for Android Composite ADB Interface (under Android Device).
I found the driver for this at http://developer.android.com/sdk/win-usb.html
Right click Android Composite ADB Interface, go to the driver tab, and click update driver. Then select Browse my computer for driver software and point it to the location where you extracted the usb driver package.
After doing this confirm that ADB can see your device by opening a command prompt, navigate your android sdk folder, and then go into a folder called platform-tools. Then run the command "adb.exe devices". If the tango is listed there then your drivers are correctly installed and adb can see the Tango.
I had the same issue on Windows 7 and it only saw the Tablet as a storage device. I had enabled developer options in the tablet as described above, but I had missed the step on turning on USB debugging. The moment I did that it appeared as a ADB device and I installed the Google USB driver and then I could see it and deploy onto it from Android Studio.
I previously had issues with the Peanut but if you followed the instructions for that EXACTLY it would work You have to specify the device driver file exactly,
not let windows chose one for you or let it tell you that its driver is better :-)
You need to update the driver in your device manager.
Click start
Right-click "Computer"
Select "Manage"
Select "Device Manager"
Find your device
Right-click "Update Driver Software"
Choose "Browse my computer"
Now search for the Android SDK you installed (on mine it is in c:\users\MyName\AppData\Local\Android\SDK) and select the sub folder Extras\Google\USBDriver

Galaxy Gear not recognized by adb and odin after last update

Today I updated my galaxy gear to latest version and since then adb and odin are not recognizing it. I tried almost everything, changing cable, restarting, usb debugging on/off, i have no idea what could it be.
ADB always returns an emtpy list on "adb devices" and error:no device on adb:shell.
Any idea?
If anyone has a problem to this, I solved it. As I updated my Galaxy Gear from android to Tizen OS, Gear is no longer listed as an android device and you can not see it by running adb command, instead you can see it by running sdb command( its available once you download tizen SDK for wearable).
I downgraded from Tizen OS to Android OS via this method without any problem because I wanted to be able to run full APKs on my Gear.
http://forum.xda-developers.com/showthread.php?t=2776157
Cheers

Android: Within Android Device Chooser the same device shows up several times

I am using Eclipse to program for the Android OS. I use a real device to test my application on.
To test my application I click on run, then the target project i wanna run and then the Android Device Chooser pops up, where I can choose the device or emulator that I want to run the application. (like probably every programmer here).
But sometimes when my app crashes because of some exception, the Android Device Handler gets some weired behavior. Now everytime I connect my device to the computer via USB a new device shows up in the Android Device Chooser, but all them (which are the same) are "unknown", so I cant use my device for testing anymore.
(source: yfrog.com)
The only way to solve this is by restarting my computer. Isnt there any other way to solve the problem? Am I missing something?
In your command line. (assuming ADB is on your path)
Try:
adb kill-server
adb start-server
adb devices
Unplug the device from the system.
Restart the eclipse IDE.
Goto the device development setting, uncheck and then check the USB debugging.
Issue will be resolved.

Resources