I use my mobile device to run my flutter applications. I know all about the hot reload but I'm so tired of having to wait every time I connect back to my phone again maybe the next day and then the app has to be re installed and the gradle task assembler has to be built again. Please I want to ask if there is a way to reconnect easily and a way for the apps to run easily again any time I want to work on a project again after a while.
There are a couple of alternatives to building the APK and installing it on a physical device:
Use an emulated android device
You can use an android emulator. The easiest way to set that up is probably the graphical interface in Android Studio (see https://developer.android.com/studio/run/managing-avds), but you can also use flutter emulators --create [--name <Name>] to create a new virtual device. Then use the button in the bottom right of VS Code to select that device, before launching the debugger.
Build for desktop
Depending on the dependencies of your app, you could try building the app for the platform you're developing on (Windows, Linux, or macOS). This has the same visual result as an Android app, but does not need an emulator or physical device. The rendering engine is the same (Skia) on all platforms. The obvious downside is that some plugins may not be available for desktop.
See https://docs.flutter.dev/development/platform-integration/desktop on how to set that up.
I make a simple project on android studio it work fine on that device which is connected by usb. When i try to share that app from one device to another then it show app not install to another target device. I make build app after that i also share on another target device, it also show same issue. Please tell me.
I'm a novice in android app development (using Android Studio) and want to make an app and all set for go on but I have an issue and that is how can I run my app on my tab for test purpose as you know android emulator is slow (very slow). I had checked some answer but all are for window specific and I have Linux operating system.
I have a tablet (not rooted).
Usb cable.
wifi connection.
I need a way where I don't have to root my tablet and work on Linux too.
Thank you in advance
When you insert the cable of the tablet, linux should recognize it, if is not recognized you may install a driver.You can run the command:
$ lsusb
After that when appears the screen after you press run in AS, just select the device instead of the emulator.
If does not work, it could be that your tablet in development options ( psychically you have to interact with your tablet) does not have checked the option debug( on default is not activated), on some devices you have to look in the internet how to access to this option.
A last recommendation is to check in the manifest and in the build.gradle( take care there are two of them) that debbugable is set as true
I want to debug my android application, I have Eclipse Installed fully setup for android developement.
The problem is,
1) I can't run android emulator(Hardware Concerns).
2) I can't attach phone to my computer(Driver Concerns).
Now,
Is there a way to get debug functionality by putting directly the apk into the phone storage and installing it from there.
I wanted get the logcat of the application that I'll be running.
Basically I'm quite naive in android, I'm not quite sure of the terms I said but, What I want is a way to test my app on my phone without the role of my PC.
If you have root you can use Wifi ADB
Also you can remove drivers for this device and install other driver from your device manufacturer.
If you can run standard emulator you can use Genymotion.
i m starting (or at least trying to) developing android application(s) and I m using eclipse for it along the android sdk.
Now I m wondering if there's a faster way to "test" and tryout something newly writen in the code than starting it in the emulator?
I'm wondering because I m running on 8gb ram and q9550 (quadcore) and it takes some time (let's say 20secs) to upload and start the apk and now
I'm wondering if this really is the only way to test since it requires huge amount of time, especially when I'm trying something new which doesn't work and thus I'm always gotta run it like this let's say like 20 times until I figure out what's wrong with my code...
You can connect your android phone using USB debugging mode and debug your code. If you can't do that, you can export an apk file (which is quick) and use dropbox/gmail to send it to your phone. I am not a big fan of emulator :)
Here's how to enable usb debugging
http://www.groovypost.com/howto/mobile/how-to-enable-usb-debugging-android-phone/
I would recommend running on your device rather than the emulator.
http://developer.android.com/tools/device.html
In short:
Turn on "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 located in Settings > Developer options).
Set up your system to detect your device.
If you're developing on Windows, you need to install a USB driver for adb. For an installation guide and links to OEM drivers, see the OEM USB Drivers document.
If you're developing on Mac OS X, it just works. Skip this step.
If you're developing on Ubuntu Linux, there is a detailed guide in the link above.
Now in eclipse, your device should be available to run on.
In the eclipse toolkit, you have the option to run it directly on a device. It's rather quick to do so.
Enable USB debugging as well as installation of apk from sources other than the market. Then assuming you have already setup the required drivers/settings to connect to your phone via ADB, you should be able to run it on the device and debug. In the run dialog, it will list all available devices and you can simply select the one you want to use.
If you already have a run entry (i.e. you've already run your application),
select your project
click Run -> Run Configuration
You should be in your application run configuration (on the left under Android Application -> Your_App).
In the Target tab, you should be able to select your device. It will likely already be in "Automatically pick compatible device...". On my setup, it will run directly on my phone if it's the only available device. You can select Always prompt to pick device which will let you choose every time.
Eclipse plugin (ADT) information: http://developer.android.com/tools/help/adt.html
Information about setting up your device: http://developer.android.com/tools/device.html
I know android emulator is too slow.
You can either use device or
try bluestacks it saves lots of time.
User device only when you want to test your app for particular device.
Here is what you are looking for :
http://developer.android.com/tools/device.html
To summarize:
Plug your phone to your computer with a USB cable.
Make sure the drivers are installed and your phone properly connected.
Make a Ctrl + F11 from eclipse.
It will build the apk, transfer it to your phone and then launch it automatically.
If you have unit tests, Robolectric lets you run them without using the emulator or the device.
you can download bluestacks as emulator, as it is really fast.
after then make settings in eclipse as window->preferences->android->build -> then uncheck the 3rd checkbox written as "skip packaging and...", then apply and restart the eclipse to take effect.
now open the bluestacks in background and just double click the apk file in bin folder of eclipse and bluestack will install it in 2 to 3 secs and you can directly see the result.
NOTE here that you have to only save the file ,you working on in eclipse and only double click on apk, and result will directly appears to bluestacks. Without uninstalling and reinstalling apk in bluestacks.
and you can delete your apk also, it automatically immediately create
a fresh version of apk (thus not required) as soon as you save all your files apk will be updated.
Google BlueStacks.
It runs on Windows and it's really fast.