I started using the USB debugging mode on Android Studio and when i run my project the display on the phone is completely wrong. The ide displays the correct way i want it to look but when i open the app on the phone the app's displayed contents are all thrown into the top of the screen. Why is it doing this? Sorry for huge picture btw.
It seems that you are using ConstraintLayout, but you haven't set any vertical constraints for your views. Therefore, when you run the app, all the views are jumping to the top. Click on the red exclamation mark, it will show you the same thing. Go to the code view, it will also show you the same error.
You should use minimum 2 constraints from top or bottom nd start or end
It will help you views to attach each other
I am using Linux Mint 18.2 and Android Studio 3.0. I started my avd nexus 5 oreo, it's running but not working computers keyboard. I couldn't write anything. Only when i can write something about hundred times try with mouse right and left click. It's silly. I check avd config.ini. Thats true and see hw.keyboard=yes.
I think it can not focus on the emulator window and so its not writing.
Like i sad the problem is emulator window is not focused.
I found two solution.
Right and left keys of the mouse to be written in the text area click quickly 3 or 4 times. (So the window focuses, if you look at the window title it will be understood. Note: You have to do this every time)
Go to your Window Manager, find Focus tab, Change Focus Model -> "Focus follow mouse". (Permanent solution which Paul Freez's answer -> https://stackoverflow.com/a/42720450/4300071)
I am using Android Studio on Ubuntu 16.04. The AVD emulator starts fine, and I can install apks on it. However, if I change to a different workspace, minimise the emulator, or even click on another window, backrounding the emulator, it appears to minimise(only visible in the task bar), and from then on, it will not maximise again. Clicking on it in the bottom task bar makes it appear for a split second before minimising again. I haven't had this problem with any other window. Anyone know how to fix it?
So far I have tried:
Setting the emulator window to always stay on top
answer to install various libs that have helped people with similar AVD problems
Starting the emulator from the command line
For Windows use:
If a window won’t maximize, press Shift+Ctrl and then right-click its icon on the taskbar and select Restore or Maximize, instead of double-clicking on the icon.
I have found a workaround. By clicking into the window menu from the very top left of the emulator window, I set the emulator to both 'always be on bottom' AND always appear in all workspaces. This way, switching workspaces doesn't have any effect on the emulator, and keeping it to the bottom layer means I can open other programs in other workspaces and not have the emulator in the way. I just can't ever minimise it. It's not ideal, but at least I can do my work!
In the bottom left corner of Android studio, there is a squared icon that allows you to see all Panles. it includes also Emulator. By selecting it, I was able to have my Emulator back on screen (view mode: float).
I'm new to android developing and have an issue with android emulator, it has no window frame! I can't move it over my screen or move to second monitor, it is freaking me out! I tried to google it out, but found no solution, can anyone tell me how can I fix that?
I had same problem. There is a frame. It just launches outside the screen and you can't grab it.
"Simple" solution: Start the emulator and then right click on the Windows taskbar and hit "Cascade Windows". That will move the emulator window down low enough to grab the Windows frame.
There is a nice workaround: open the window context menu by pressing alt+space. Then select 'move' and move the window with the arrow keys.
I have an application in which I need to implement image editing, which also includes pinch zooming. I am done with pinch zooming but I can test this only on device, not on emulator.
Is there any way for testing pinch zooming in android emulator, any shortcut key or any other way?
With a mouse:
Press and hold Ctrl and press and hold left mouse and while doing that move your mouse.
With a trackpad:
Press and hold Ctrl and press and hold your trackpad and move with a finger to the LEFT and RIGHT (not up and down).
Since ADT 17, it is possible to use a physical Android 4.0 device to send multitouch gestures to the emulator.See Android's instructions here.
Multi-Touch
The emulator supports multi-touch input, as an experimental feature in r17, using a tethered Android device running the SdkControllerMultitouch application. The application contains an activity that monitors touch inputs and sends them to the emulator. This requires an Android 4.0 or later system image.
The activity displays the content of the emulator screens to help with interactivity. It is recommended to enable "show touches" in the Developer section of the Settings on the emulator to see exactly where the touches are sent.
The SdkControllerSensor application source code is located in
$SDK/tools/apps/SdkControllerMultitouch/
But this is still a workaround since we need a real device. My advice would be to test your app directly on a real device as it's more robust, and even more performant.
I know it's late reply but this might save someones time.
Double-click and then hold down the second click and move the mouse up to zoom out or down to zoom in.
Hope this works!
On a Mac running the latest version of AndroidStudio and a vanilla Nexus 5 API 24 emulator all you have to do is keep cmd (⌘) pressed.
The drag points will appear.
After that just left click and drag anywhere on the screen!
I know this is old but this might still help someone.
On mac:
To zoom in use double click
(on track pad)
To zoom out use Command + Shift + click (on track pad)
OK, I was experimenting a bit, and on the bluestacks android emulator, I've figured it out.
It is Ctrl+Mouse wheel.
Works for me, hope it helps you too.
There has been some progress in this field with android tools release 17 : you can use a device to control the emulator : http://developer.android.com/sdk/tools-notes.html.
Otherwise, it looks like testing on real device is just better for this case (and in general its also much faster).
For mac: Use the ⌥ Option key and then use your mouse or trackpad to pinch/zoom. This is working on the android studio emulator.
You can find all the shortcuts in the extended controls menu, by pressing the three dots on the menu and then navigating to "help".
Click 3 points (like preferences on emulator)
Settings
set param "Send keyboard shortcuts to" from "Virtual device" to "Emulator controls"
now gestures work perfect!
An Android Emulator doesn't support multi-touch you can't test it on emulators. Please use real-device for multitouch testing.
For recent developments in this regard read this - http://tools.android.com/tips/hardware-emulation
PinchZoom works on Multi-Touch.
If the device is supporting multi-touch then only your code will work else it wont work.
As the Android Emulators doesn't support multi-touch you can't test it on emulators.
Still new ADT has feature But I never tried this
CTRL + a click on left side of the view screen will zoom out.
Double click on a location will zoom in.
North and South -> Scroll wheel - up and down
West-> CTRL+Scroll up at left side of the screen
East-> CTRL+Scroll up at right side of the screen
On macbook with Android studio Bumblebee, I have to hold control first which lets the drag pointer to appear on the screen. Then all I need to do is double tap, hold the second tap, and drag to zoom-in/out.
As of March 1, 2016 for the Android Studio's emulator on Windows. The pinch key on the emulator is the Alt key. Hold down Alt and click and drag your mouse button.
The CTRL key might still work for you, but it doesn't work for me.
You can not able to test pinch zoom in Emulator. Please use Real device to test pinch zoom effect.
I have not try with youwave. May be you can able to test pinch in that environment.
Not sur but just try with it.
Enjoy Coding....