Android: a quick way to "test" an application

im starts (or at least tries) to develop android applications (applications) using eclipse for it via android sdk.

Now I wonder if there is a faster way to “test” and try something new in the code than to run it in the emulator?

I am interested because I work on 8gb ram and q9550 (quadcore), and it takes some time to load and run apk (let's say 20 seconds)

I am wondering if this is really the only way to test, because it takes a huge amount of time, especially when I try something new that does not work, and therefore I always have to run it, as it can be said. like 20 times until I find out what happened to my code ...

+4
source share
9 answers

In the eclipse toolbox, you can run it directly on the device. This is pretty quick to do.

Enable USB debugging, as well as install apk from sources other than the market. Then, assuming that you have already installed the necessary drivers / settings for connecting to your phone through ADB, you should be able to run it on the device and debug it. In the run dialog, it displays all available devices, and you can simply select the one you want to use.

If you already have a startup entry (i.e. you have already launched the application),

  • choose your project
  • click Run → Run Configuration

You must be in the application launch configuration (on the left in the Android application → Your_App).

On the "Target" tab, you can select your device. This will probably already be in the "Automatically select a compatible device ..." section. In my setup, it will work directly on my phone if this is the only device available. You can select “Always” to select a device that allows you to choose each time.

Eclipse Plugin Information (ADT): http://developer.android.com/tools/help/adt.html

Device Setup Information: http://developer.android.com/tools/device.html

+2
source

You can connect your Android phone using USB debugging mode and debug your code. If you cannot do this, you can export the apk file (which is fast) and use dropbox / gmail to send to your phone. I'm not a big fan of the emulator :)

Here's how to enable usb debugging.

http://www.groovypost.com/howto/mobile/how-to-enable-usb-debugging-android-phone/

+7
source

I would recommend working on your device, not in the emulator.

In short:

  • Enable "USB Debugging" on your device.
    • On the device, go to "Settings"> "Applications"> "Development" and enable USB debugging (on an Android 4.0 device, the setting is in the "Settings"> "Developer Settings" section).
  • Configure your system to discover your device.
    • If you are running Windows, you need to install the USB driver for adb. For installation instructions and links to OEM drivers, see OEM USB Drivers.
    • If you are developing Mac OS X, this just works. Skip this step.
    • If you are developing Ubuntu Linux, there is a detailed guide in the above link.

Now in eclipse your device should be available for launch.

+4
source

I know that the Android emulator is too slow .

You can use the device or

try bluestacks , it saves a lot of time.

A user device only if you want to test your application for a specific device.

+2
source

Here is what you are looking for:

http://developer.android.com/tools/device.html

Summarizing:

  • Connect the phone to the computer using the USB cable.
  • Make sure the drivers are installed and your phone is connected correctly.
  • Make Ctrl + F11 from the eclipse.

It will build apk, transfer it to your phone and then launch it automatically.

+1
source

If you have unit tests, Robolectric allows you to run them without using an emulator or device.

+1
source

By Googling I found this useful post . Hope this helps someone else.

+1
source

you can download bluestacks as an emulator, as it is really fast.

after that make the settings in eclipse as window->preferences->android->build →, then uncheck the third checkbox written as “skip packaging and ...”, then apply and restart the eclipse to take effect.

now open bluestacks in the background and just double-click the apk file in the bin eclipse folder and bluestack will install it after 2 - 3 seconds and you can directly see the result.

Please note that you need to save the file only if you are working in eclipse and only double click on apk and the result will be directly displayed in bluestacks. Without uninstalling and reinstalling apk in bluestacks.

and you can also delete your apk, it will automatically immediately create an updated version of apk (it is not required), as soon as you save all your files, apk will be updated.

+1
source

Google BlueStacks

It runs on Windows and is very fast.

0
source

Source: https://habr.com/ru/post/1436827/


All Articles