how to test my 2.1 android application on 2.2 device? - android

i have made an android application using android 2.1. i want to test how my application will behave on a device with android 2.2 and 2.3. How do i test it in eclipse. i do not have any real devices to test my application.
In eclipse, if i make an emulator with 2.2 , it does not list up in my application run configration. what i mean to say is that eclipse is not allowing me to run my 2.1 app on 2.2 device. how do i test my application on an emulator?
thank you in advance.

Launch the emulator in which you have to test the application. Wait until the home screen is ready.
then run the application it will load it in the emulator currently running.
You have specify the following line in emulator,
<uses-sdk android:minSdkVersion="7" />

You should be able to run your application on any device (emulator or physical) that has a version greater than the one specified in your manifest minSdkVersion attribute.
Note that you can also run an application compiled with a greater SDK version on an older emulator (again, the minSdkVersion attribute should be having a proper value). This way you can test support for the newest features without crashing on the older platforms.

The previous answers are both good. To be more specific, start your 2.2 emulator by going in "Window" -> "Android SDK and AVD manager", select the emulator you want to test on and press Start.
After the emulator finished loading run your project with "Run Configurations...", select "Manual" deployment in the "Target" tab and after you press Run you should be able to select the emulator from a list of running Android devices.
Hope this is clear enough.

Related

Instant Run is not supported on devices with API levels 20 or lower using Blue Stack emulator

I have downloaded Android studio and Bluestack Emulator. However, the default device provided by Bluestack is of API 19(Samsung)
When I try to run the code there is an error message:
"Instant Run is not supported on devices with API levels 20 or lower."
How can I get a higher API emulator device or make the instant run go... ? I am just learning Android development so I am not concerned with what API I build in... I just want the program to run so that I can move on with coding something new.
If you are using Android Studio on Mac. You can go to Preferences/Instant Run/ and disable all selections.

How does Ionic decide which Android emulator to launch?

I am following this for Android platform: http://ionicframework.com/getting-started/ (cmd> ionic emulate android) . It builds ok, and I know the apk works on a phone, but I want to figure out how does it decided which Android Virtual Device to launch. At the moment, it start up a v2.2 emulator by default and then complains it's too old while trying to install the apk. I want to use v4.1 or higher (I have the relevant SDKs installed through previous native Android development using Eclipse.)
From the command line, just specify the emulator target.
e.g. ionic emulate android --target="Nexus_6P_API_25"
Check the AVD manager for a list of available and installed virtual devices.
Kind of found an answer myself. Instead of using Google Android emulator, one can use
Genymotion. And use can set the device screen size and Android version.

Why my Delphi's Android Emulator does not run the applications?

I installed Delphi XE5, I runned Delphi's Android Tools and updated all the packages suggested by it. Only then the Emulator worked.
Now I created some android apps as tests to run. In my phone they work, but when I press the run button, Delphi asks if I want to load and use the Android Emulator.
It starts Ok, then I unblock it by swapping the mouse, and after some seconds the app starts but I see only a totally black screen.
If I click home button on the emulator and then run again in Delphi, the black screen appears again, meaning that the app was load but it's main window do not load.
What my I be doing wrong?
If you have installed Eclipse and the android SDK tools for it you should change the default Delphi SDK settings.
Do this as follows:
In delphi open tab tools
options
SDK manager
Set de SDK properties to the eclipse locations on your computer
if you have done this correctly you should be able to make a new emulator in eclipse and see it in delphi.
When you create a new emulator you need to set the CPU to ARM and also check Use host GPU otherwise it can't run the delphi apps!
Are you using the emulator from within a virtual machine - e.g. Within parallels on a mac?. If so, you can pretty well forget being able to use the emulator.
The emulators are extremely resource hungry and are probably best run on a well-spec'd dedicated machine.

Can't get Eclipse to build and run app on Galaxy Note 2

I've followed all the instructions at http://developer.android.com/training/basics/firstapp/running-app.html to make a "hello world" app, but despite everything I try, nothing is happening on my device.
I've installed Samsung Kies for what it's worth, and my phone is detected by the OS for file transfer... but when I "Run As - Android Application" in Eclipse, nothing happens at all.
USB debugging is on for my phone.
Edit (June 7, 2013):
I've removed my old installation of Eclipse and the android SDK and downloaded the bundle from http://developer.android.com/sdk/index.html. Still nothing will happen when I try to run as Android Aplication.
I've run adb devices and I get the following output, so I guess my phone is detected:
List of devices attached
42f78b1517259fe5 device
I managed to find a way to add a device to Eclipse, as Galaxy Note 2 wasn't in the dropdown box... but that doesn't seem to do anything other than change the preview image in the activity editor.
I'm not sure if I did it right, but here's the logcat -d dump as suggested
http://pastebin.com/fmrPn3UU
My phone is running 4.1.2. I don't know what else to try, and I can't seem to find out anything else online.
Try forcing Eclipse to prompt you for a device to choose. See if it still does nothing, or if it actually runs.
To allow Eclipse to prompt you:
Open the Run menu > Run configurations
Within the new window, under the Android Application
If you have any configuration, delete the configuration
Create a new configuration by double clicking Android Application or clicking the New button.
Under the Android tab
Select your Android app project within the Project box
Launch action should be Launch Default Activity
Next, open the Target tab
Select Always prompt to pick device
Click Apply
Click Close
Now the next time you run your application, it will ask you to start your application in your phone or an emulator.
If you want to use the same one for the duration of your eclipse session, or until you've unplugged your phone, check the Use same device for future launches box.
This also has the added benefit of allowing you to choose different AVD versions to test your app on different devices or emulators easier.
Update from comments
To force stop your app if completely necessary
Go to the DDMS perspective within Eclipse
Window > Open Perspective > DDMS (it's it not listed, click Other...)
Click your process such as com.example.testapp
Click the Stop button (red stop sign)
I think your question is
Q: "Should I be able to run and debug my Android application on a physical handset, not just the emulator?"
A: Yes, absolutely. Including your Galaxy Note 2
Look here:
http://developer.android.com/tools/device.html
This is basically exactly the same, except it gives details specifically for the Galaxy Note:
http://www.technipages.com/samsung-galaxy-note2-how-to-enable-usb-debugging.html
BOTTOM LINE:
You should be able to debug using either/both an emulator and/or a physical handset, all from your Eclipse IDE.
'Hope that helps..
Try using the Galaxy Note 2 toolkit from XDA and installing the drivers that way, then manually set up your device in Eclipse.
Try looking at your AndroidManifest.xml file in your Android project. I believe your note 2 is running Android 4.1.2 (which is revision 16).
If your Hello World application has the minimum SDK version requirement set to be 17 or higher, your device will not be recognized on the available devices. Change android:minSdkVersion attribute in uses-sdk tag to android:minSdkVersion="16" and it will be displayed.
In 'USB PC connection' in the floating menu there are two options. In my cell was labeled 'Media Device' and I switched to 'Camera' and started to work.
I got the same problem. I am using MAC. I downloaded Eclipse(Java Standard 4.4) first and then installed ADT from eclipse manually. My code works and it can only run in emulator. It cannot find the Note2. I install Android Studio and it works with my Note2. Tried many methods but my eclipse cannot find my Note2. so I download the Android ADT from android.com directly and it works with my Note2. Since we can have two Eclipse on one computer, so it you can keep both Eclipse like me. One for PHP and one for Android. If you have the same problem, please try it.

Missing AVDs during debug in Eclipse

I'm developing a widget with the following Sdk settings in AndroidManifest.xml:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
I've defined some devices with android 4.0.3 (Intel), some with 2.3.3 (both Arm and Intel) and I have also a physical device at 4.0.4:
When I try to debug my widget app, the only available devices (running or that can be started) are the devices at 4.0.3 and 4.0.4. I tried to manually start from AVD Manager one of the devices at 2.3.3 and then it showed up in the list of the running devices, but with a red X that (I think) means there is some problem:
I can debug then the app on the 2.3.3 device, but I'm experiencing some problems (not yet investigated)... Can you tell me a possible reason for AVDs not showing up in the debug window?
If I create another blank project with targetSdkVersion=10 all the devices are shown, but they should be shown also in my project, given the minSdkVersion="8", right?
The AVDs aren't showing up in the "Choose a running Android device" panel because they haven't started yet. You need to manually start the AVDs on your computer to run your app on them. Another option is to have it set up to start an AVD automatically when you want to run the app and no devices are connected, but that can get in the way sometimes.
Also, the red X there is usually because you're building for an Android version that's above the version that the device is running.
I had the same problem. The only thing that helped was an upgrade of ADT/SDK. If you do want to test your app, start the emulator in the AVD manager and wait for it to start up. Then you will be able to select it when pressing "run".
The red X is not a problem. It just means that it doesn't meet the build target of the app. Which... if you are developing, you should be targeting the highest version.

Categories

Resources