Is there a way to hide the Android Device Chooser? - android

Whenever I run my app I get the Android Device Chooser dialog:
This is happening because I am using the Google APIs for 1.6 and trying to run the application on my Nexus one. Is there any way to make this automatically, or to not check the compatibility? Sometimes when I make a modification and quickly after I save and run the application, Eclipse will build the project and the Android Device Chooser dialog will show briefly and disappear and the app won't run. I have to click run again for it to work. Any workarounds?

Once you have installed ADT, you need to define an ADT launch configuration, in order for your project to execute itself as an Android executable.
(source: google.com)
Then, do not forget to To go in Eclipse->Preferences->Run/Debug->Launching.
In the “Launch Operation” subsection, select “Always launch the previously launched application”:
(source: turbulent.ca)

Create a run configuration.
Run -> Run Configurations.
Select your project and specify your target and from then on run that configuration when you run that app.

The key is the very top line in the screen shot of your Android Device Chooser. Notice that it is asking you to select a device compatible with a Google API target. This dialog only ignores your launch preference when the Android version you selected in your project's properties is one of the "GoogleAPIs" type. Choosing one of the Android Open Source Project versions will respect your launching preferences.

This is a bug (or intentional behavior) in ADT when anything other than a stock SDK version is selected. You will experience this when targeting "Google APIs" rather than a plain Android SDK.
For the details, see the implementation of AndroidLaunchController.java within the adt project. (Basically, whenever you target something other than a plain SDK, it can't tell if the attached device satisfies the requested libraries, in this case Google APIs.)

Just set the 'target' tab to the 'Automatic' option and it will launch on your device automatically.

Related

Building my first mobile application

I`m thinking of making my first mobile application and I dont know where to start. so how do I starting building my mobile application?
Good places to start is Getting Started and Introduction to Corona.
First download android studio from this link
https://developer.android.com/studio/index.html
also download jdk from this link according to your machine specification and - operating system
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
install android studio according to instructions (it may take time as you need to download sdk etc)
make sure jdk path has been set correctly in environment variables
launch android studio and make new project (file>new>New Project now when gradle built is finished and no process is running)
go to tools>android>avd manager
create virtual device (choose one with low resolution)
now download the latest android version (click next) select portrait click - - finish and close the window
now click on run>run app (enable VTx in system bios if not enable)
your hello world app will be launched emulator
now come back to stack overflow mark this answer as correct
Important- now do as #Dwhitz told you and google such things before asking on stackoverflow

Xamarin MonoDroid does not support running the previous version

I have just installed the Xamarin tools, installation went without any errors.
I have launched VS 2013 Update 4 Pro and created Blank App ( Native Shared ).
I did not modify code or project structure, just tried to run.
So i have changed the Startup Project to Adnroid project:
Then i have rebuilt the entire solution.
The console prompted Rebuild succeeded.
I have noticed that debugging button has a very long path, which is strange:
If i click on any option it opens the AVD Manager, but doesn't change the Start, to selected device.
So i have tried launching the Emulator from AVD manager and it works.
But when i click start in VS it prompts me:
Where is the problem? How can a newly installed app not work?
You project is most likely targeting lower version of android API. Try changing the target android version.
A note here should be that within Visual Studio/Xamarin the settings regarding supported version are within the solution settings of that project.
In this way you can change the version to support what you need, or if it is correct download a more current simulator.
This can be done with GenyMotion for instance or Xamarin Android Player.
This error message currently can be shown due to a large number of different issues.
Visit Build Failed. MonoDroid does not support running the previous version to learn about the different causes for this error message.

Cannot create a new android application on eclipse

I am a beginner to android development,I have downloaded adt-bundle-windows-x86_64 with android 4.2 and started the eclipse version(Android developer tools) provided with it.But when I click finish after filling all the details in new android application dialog box,the finish button doesn't seem to respond at all.At the first click on finish button an application is created but no java files in it and the dialog box stays still.At least the android 4.2 library is not in the application.src is also empty.
I'm working with Windows 7 64bit and JDK 1.6 64bit.
Any idea on solving this?
http://developer.android.com/training/basics/firstapp/creating-project.html
http://developer.android.com/tools/help/adt.html
http://www.chhitizbuchasia.com/articles/chhitiz/2011/02/Setup%20Android%20SDK%20With%20Eclipse.html
http://developer.android.com/sdk/installing/installing-adt.html
Cannot create a new Android Project using Eclipse
install android sdk manager
step1
step2
step3
install the following sdk to perform the application
Download ADT plugin
http://developer.android.com/sdk/installing/installing-adt.html#Download
BASIC STEPS
http://blog.teamtreehouse.com/the-one-stop-android-sdk-installer-you-always-wanted
Best Jvm setting
Eclipse is not that much robust IDE.If nothing can solve your issue.try to restart Eclipse and your Computer.
and yes,before restarting just update the packages.
Go to SDK Manager, and install available updates for following packages.
Android SDK Tools
Android SDK Platform-tools
After updating,it will be look like this,
I just got mine past this bug; hopefully yours will fix too?
On the screens with menus to select from, where one item is greyed (selected?) as default:
Deliberately click the item, to ACTUALLY select it (it turns dark blue or something).
Mine apparently got caught up on the "Make activity" (or whatever) page, and until I went back and assumed that the default had failed to select it, I was unable to choose finish (even though it clicked, looked as though it was going to do something, and then didn't go).

Eclipse cannot find Android Support Library

I am an experienced programmer but new to Android, hence using Eclipse for the first time.
Unfortunately I cannot get my first project off the ground. I get as far trying to create the project when the following sequence happens.
A screen arrives titled 'Install Dependencies' telling me that the required version is 8 and the installed version is 'Not installed'
I click on the Install/Upgrade button and something must happen because Android SDK Manager pops up and I get a whole series of 'Fetching:' messages.
The next screen asks me to Choose Package to Install and the only option is Android Support Library, revision 10. This doesn't bother me as I presume 10 is better than 8 so I hit the Install button.
This is where it all goes wrong as I get a red message saying:-
File not found:C:\Program Files (X86)\Android\android-sdk\temp\support_r10.zip (Acces is denied).
Sure enough, when I check this folder, it is empty.
Now, something must have happened as as SDK Manager did a whole lot of fetching and must have put these files somewhere.
I am quite happy to find them and put them in the correct folder but the question is
What is the name of the files that I am looking for?
Run SDK Manager as administrator and then install Android Support Library from Extras
Download the sdk manager seperately and install files from there. put it in a place which is accessible to you and then point your eclipse android directory to it. tools>options>android sdk
Run eclipse as Administrator. This is the solution.
Try running your application (Eclipse) in Admin Mode.
Right click on the Eclipse app, and choose "Run as Administrator"
This will fix your problem.
properties >java build path >click library tab > add jars > add jars from the support library.

How to install old SDK platform

I want to test against Android 1.3 platform instead of latest 2.2.
Here is how my Android SDK and AVD Manager look likes.
However, I was expecting (screen from http://developer.android.com/sdk/installing.html#components), so that I can select old platform.
Is there anything I had missed out?
Run Help > Check for Updates first, to update your Eclipse plug-in, then you can access the repository. Why would you want to test against 1.3? If anything is still on that old a version of Android (was there even a 1.3? It's not listed here), it's an insignificant portion of the market. The earliest you should even worry about is 1.5.
Also - on the bottom of the first screen between "Delete Add-on Site..." and "Refresh" uncheck the "Display updates only" check box.

Categories

Resources