I just downloaded the android sdk from the adnroid site and followed this tutorial to set it up on netbeans. Everything to seem to have installed fine but whenever i try to run the application this window pops up:
alt text http://img80.imageshack.us/img80/4327/androidemulator.png
What I am assuming it asking me to choose the emulator, but it is not showing up on the list. Is there a reason why?
I don't use netbeans, but it looks like you don't have any AVD's created, and if you do, then there is probably a way to associate them that you are missing in netbeans. You can check here to create an AVD http://developer.android.com/guide/developing/tools/avd.html
But I would just use eclipse if possible, the integration works really well, and it was written to run in eclipse, so there are less issues and hurdles.
Also see Running Your Application section of http://developer.android.com/guide/developing/other-ide.html that will describe how to launch the app from the tools outside of the IDE.
I have the same problem with you. But i have my emulator works now.
Are you have to do is running your Android SDK Manager, then click Virtual devices, and Make new AVD device.
Click New. Then fill name, and select Target (Platform of your Android), Skin, and hardware.
Then click Create AVD to finish.
Now you have device to choose. :)
go in C:\Program Files\Android\android-sdk\SDK Manager.exe and create the virtual device. After it appear in device list.
Thats it.
Open Sdk manager
Tool Manage AVD
Select and start AVD. wait open.
Goto netbean Run project.
U must see project run in AVD.
Success..
The article at the link #broschb had posted is explaining how to create an AVD using command line. Do exactly what is says there (it's very easy). Once you have created the AVD it will appear in the AVD list in Netbeans. Actually, if you have only one AVD it will start by default when you run your app.
run the avd manager which is location in the android-sdk folder and then create a new avd,but be sure you have already downloaded ARM EABI system image tool set.
Just create avd (android virtual device) and run it..
like android -avd "name of your avd"
Then try to run your application.
It will ask you to select the virtual device that you have started above.
Thats it.
Related
I am trying to rebuild an old javafx project on android. Currently I am using javafxports to do so. The problem is I can't debug it, this is how the project hierarchy looks:
The application is started from DisplayClient. So far I am able to log messages using the device monitor. Can you please tell me if it is possible to attach a debugger and if it is how? If any further information is needed I would be happy to give it.
You can easily attach a debugger to your IntelliJ IDE while running your app on an Android device.
To debug a JavaFXPorts/Gluon Mobile that you have created using the Gluon plugin for your IDE (NetBeans, IntelliJ or Eclipse), and that you have deployed to the Android device, follow these steps:
1. Create the JavaFX mobile app from your IDE
For that you can use the Gluon plugin for your IDE. Use one of the built-in templates to create your project or go and use one of the many samples available here.
Let's say you use the Single View project. Provide a name and run the app
2. Create the apk
Run the task from the Gradle View Tasks->other->AndroidInstall to create the apk (or on command line run ./gradlew android).
3. Open the app on your device
Make sure the app works on your device, and don't close it.
4. Open Android Device Monitor
Go to <android sdk>/tools and run monitor. On the left, on top you should see the device, and a list of processes. Find your app package name there, select it and see the port it is using for the app (8600).
5. Attach the debugger on your IDE
Finally, go back to your IDE, and attach the remote debugger, with localhost and 8600 port. For the IntelliJ IDE, go to Run->Edit Configurations..., on the upper left click +, select the Remote option, and provide a name (remote debugger), and the port:
6. Run the debugger on your IDE
Click ok to save, add some breakpoint to your code, and now run the debugger.
In this case, I have a breakpoint in the button event handler, so when I click on it, the app halts at the breakpoint:
my emulator is not runnnig and gives the error in image below
error image
and test at run window
C:\Users\Wahlah\AppData\Local\Android\sdk\tools\emulator.exe
-netdelay gprs -netspeed full -avd Nexus_4_API_21
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
and second error exist is this image
ERROR 2
I got the same problem with the same logged warnings and errors (and the alert as well).
Although from the first logged line (C:\...emulator.exe) it looked like the tools did find the emulator - my problem was resolved only after I followed this answer, and changed the ANDROID_SDK_ROOT environment variable (which pointed to a folder above the sdk instead to the sdk's folder itself).
So I changed it from
C:\Users\<username>\AppData\Local\Android
to
C:\Users\<username>\AppData\Local\Android\sdk
and... voila! The emulator is running properly.
I should note that I'm working on Windows and from the question it looks like AIR TRAVELS was as well.
I had the same problem and fixed it by selecting Cold Boot from the Tools > Android > AVD Manager > Edit > Show Advanced > Boot option from Quick Boot to Cold Boot.
Hope this helps.
You can fix this error, need configure the device again. Download all the necessary libraries through the SDK manager.
I'm having a problem with my eclipse i have edited my app and it's ready with no error shows but now when i run it into my emulator it runs another app i have in my eclipse so i deleted the app and still i run the application i want in the eclipse and still it shows the old app that i didn't even ask to install it in my emulator so it's installing an app that i don't have at first place in my eclipse i don't know how it is possible i cleaned my project and still the problem is there and changed my emulator still its install the old app for me
uninstall the app from the emulator and check in your run configuration about the running app and try with new emulator
Be sure you have selected in package explorer the app you want to run. Try to unistall the app from the emulator or create a new device on emulator. Hope this help.
Check the Run configuration: Run->Run configuration. Under the Android tab, choose your project. If you run in Debug, you have similar option too.
Another similar case I saw, is that some application was installed, but the name was not updated. Verify the names of your application in both the strings.xml and the Manifest. (If you create a project by duplicating another one, it might be the problem).
I've turned the internet upside down and looked into Google's official tutorials looking for an answer, but just couldn't find anything that actually solve my problem.
After installing everything and connecting my Galaxy S2 to the PC, clicking on "Run as -> Android application" just DOES NOTHING.
I got stuck here
So you first have to create an AVD from the AVD manager. Then go the project properties - android - set the version. Run the project - select run as android application. You could also change the run configurations and set the default AVD that you want to use.
For running on the device, goto run configurations, select your project from the pane on the left - goto target on the pane on the right - select devices only.
For those that are super newbish (like me), the AVD manager (Android Virtual Device Manager) is under the "Window" tab.
First of all just let me say that I have looked through the solutions on stackoverflow and have not found one that has worked. These include:
linking folders (but that was absurd for my case)
Creating the environment (system) variables for the computer and eclipse.
Still when I run Android Virtual Device Manager on eclipse and when I start the AVD I get:
Starting emulator for AVD 'AVD_for_4_65in_720p_Galaxy_Nexus'
PANIC: Could not open: ¨8W
I have tried other devices still it doesn't work. I have two hard drives but the AVDM says the correct path up top which is D:\Users\User.android\avd
Anyone got a solution?
Thanks a lot.
P.S.: It says the AVDs are "A valid Android Virtual Device."
You have to add a new user environment variable (Windows 7):
Start Menu > Control Panel > System > Advanced System Settings (on the left) > Environment Variables
Add a new user variable (at the top) that points your home user directory:
Variable name: ANDROID_SDK_HOME
Variable value: C:\Users>User Name<
Also, move the .android folder in your Users directory to the same directory your SDK is in
maybe something went wrong with your configurations .
close eclipse and adt , and then delete the ".android" folders from both the drive you have installed it into , and from your user folder.
also , try to uninstall the sdk tools from the sdk manager , and then re-install them . in addition , try to use a little older android version for the emulator .
another solution is to set the environment parameter of your system:
ANDROID_SDK_HOME = C:\users\my.username
if nothing helps , try to completely uninstall anything related to android , and install on a different drive (or the default one).
anyway , this issue was already reported and handled by some users here .
Try to run eclipse "As Administrator".
Of course after adding the path and user home.
It works every time for me. When i simple "run" eclipse it gives me
PANIC: Could not open: ¨8W //or something similar, almost different each time
When i "run as administrator" it works perfect every time.