Android Emulator Scroll Down Doesn't Work in Home Page - android

I am new in Android Studio. I am using Android Emulator for call rest API for my backend. Before, i scroll down basicly in main android page. But after i wanted to tried scroll down, as if i right clicked, Home Setting, Widgets and Wallpaper pop-up show me. What is the solution about that. I never changed any setting.
Thanks for reply.

It looks like your emulator is frozen. It happens quite often.
I would suggest you to try these:
Restart your computer and try to run your app in the emulator. After it successfully runs, now try to clear the app cache.
If that didn't help, create another emulator. I recommend to choose different device and API level than the current emulator device but it is not necessary. This should solve your problem.
Tips
If you want to clear data, clear cache, uninstall app, clear cache and restart the app and so many such actions from android studio without touching your emulator then you can use ADB Idea plugin.
For that, in android studio go to Settings -> Plugins
search for ADB Idea in marketplace. Install it.
You need to restart android studio.
To use it:
You can press shift key in your keyboard twice and search for Adb in search window. You will get all the options from the plugin
From android studio menu... Tools -> ADB Idea and then you will see all the options available.

Related

How to reload app in Genymotion and Android Studio without rebooting the emulator?

I am using Android Studio 0.9.9 and Genymotion 2.3.1.
When I press run app in Android Studio, the Android Studio will allow me to choose to deploy my app in Genymotion which I usually do.
At this point, the app is running.
Let say at this point, I want to make a change in the code.
I saved the changes in Android Studio.
How do I reload my changes and redeploy the app without rebooting the Genymotion?
EDIT
Ultimately, just upgrade to latest stable downloads of Android Studio was the solution.
Press F1 in Genymotion and click on "Reload JS" incase of react-native app development.
Press F2 for Android Studio emulator.
First as eyal-lezmy mentioned you should download Android Studio 1.0.2 Stable edition, (you always want the latest edition, especialy if the IDE is that fresh as Android Studio is.
If I understood correctly you want to erase and re install your application from your emulator. To do so,In your emulator, go to Menu-->Settings-->Apps, then choose your application and unistall it. Then, go to Android Studio and run your applciation.
Edit considering your comment
Reload being the fact that if my app has a button in activity A, and I press it, and it opens activity B, and I go back to Android Studio to type a comment, I want to reload the app and it auto starts right back at activity A.
If you make any change to your code, then to see in in action you must re-run the application. However, if you want your default starting activity to be Activity B, then you should go to your manifest file, remove this from Activity A code:
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
and place it inside the activity B code, where you want your application to start from.
-Turn off the emulator
-In Genymotion Window click the settings icon infront of the device name
-under "Android system options", check the "Show Android navigation bar"
-click ok and start the emulator
You will get the navigation bar from where you can kill the app
I have met a similar problem in Android 2.3.7 under Genymotion. I just closed the application before starting
If you only need to reload (refresh) an application on your Genymotion mobile device emulator and see your last changes in the code, you are going to do the following:
Go to the window of Genymotion virtual device, that you run yet;
Point cursor on the top bar with ᴧ Expo logo
Make left click mouse and hold it
Move cursor to the refresh symbol ↻ and push on it
You actually don't really need to do nothing.
When you click on the IDE's button to build and deploy your app. Android Studio will close it, install it and then run it again including your changes.
What's happening on your side?
Btw, I really advise you to update Android Studio, since the 1.0 version, the soft is very stable and behaving really as expected.

Logcat doesn't work in android studio

I use android studio 0.4.2 and logcat does not work (its just empty). USB debugging is enabled, filters are disabled and log level is verbose. Any ideas?
In logcat, try going to the bottom right corner where there is a ">>" and select that. It restarts it.
Click on the "Debug App" Icon next to the "Run App" Icon or press SHIFT + F9. That seems to do the trick for me.
Try going to developer settings on the phone, and scrolling to the "Monitoring" then "Enable OpenGL Traces" and select LogCat.
I tried everything. I unintentionally found that empty tags never show. If you are using empty tags, like me, try filling with some letter (blank spaces didn't work for me).
On your android monitor:
Restart your LogCat.
Set no filters because Android studio 2.2 has Firebase.
Clear your searching filter.
Select your running device.
If not work clear Android studio caches. File->invalidate caches/restart
When apply all way but still not working then use Android device monitor. Tools -> Android -> Android device monitor.
In my case, restarting Android Studio works for me.
Go to "Window -> Preferences"
From the left panel, expand "Android" and select "Logcat". Check if "Show logcat view if message priority is atleast:" is equal to "VERBOSE". If needed, select "VERBOSE" and apply.
Now you can see your device events in LogCat.
In my case, it usually takes 20 or more seconds for my logcat to display anything. After it does, I see "debugger waiting to settle" messages. This happens every single time.
Try waiting a while to see if it ends up showing up.
Old question, but the issue seems to occur frequently while running Android Studio 1.1.0. This often happens after I clear all existing log.
When it does, I tap the restart icon (green curved arrow on top of a grey square) and it start working again.
I had the same problem and solved it in the device developer options by disabling and enabling Usb debugging.
To add to this thread of solutions,
Check for if you have multiple devices connected. Than select the device that you want logs from (upper left corner on logcat window). Sometimes, different device is selected rather than one you are debugging your app on. Hope this helps.
In my case, I had two Android phones plugged in for debugging. Switching phones, using the drop down box, didn't do a thing, so I:
-unplugged both
-restarted Android Studio (and the project)
-plugged in the (one) device for which I wanted to see the logs
That did it for me. Logs were back ... now just to fix the code.
In case you make it down here, #Maarten's comment above worked for me. Close Android Studio then adb devices at Ubuntu terminal:
ewan#xxxx:~/AndroidStudioProjects/projectx$ adb devices
List of devices attached
adb server version (41) doesn't match this client (39); killing...
* daemon started successfully
FA7Bxxxxxx2 device
Restarted Android Studio and logcat window worked again.
UPDATE: d'oh I found that I was inadvertently using version 39 from the terminal window whereas Android Studio was using 41

android eclipse avd

I'm a newbie that needs some help on getting the AVD running with my app. I've been developing C code for decades, but I have to admit the Eclipse/AVD setup has me stumped! I'm following the 'HelloWorld' tutorials on the developer.android website (and some others) and everything seems to be working OK, up to the point where I try to run it on the AVD simulator. I'm not getting any warnings, the Eclipse build/run output window says that everything is installed OK and the AVD does startup and run. Eclipse says that my app is loading, but it never runs. All I get is the simulator window with "ANDROID" on the screen and the buttons on the right-hand side.
I've got Eclipse Indigo and r18 of the Android PlugIn (I tried to install Helios, but the Eclipse website directed me to Indigo!). Is Indigo OK for running the simulator, or do I specifically need Helios? I also have Java 1.7.
The API level I have installed is Level 15 (v4.xxx of Android, I think). Don't know if I need a lower version to get my tutorial app to run, but level 15 is the only one I can select when setting up a device in the AVD manager.
I've been trying to get this going for days, trying all sorts of switches and buttons, but to no avail. Before I start uninstalling everything and reinstalling, can anyone advise if there is anything I might be missing, or has tripped over this problem themselves and found a way around it? Something that always trips up new starters maybe? Or do I need to go back to scratch?
Any help would be much appreciated.
How long are you leaving your emulator running after you attempt to launch your application? The Android OS can take a long time to boot up in the emulator. If it's stuck on the "ANDROID" screen then you're either not waiting long enough or there's something wrong with your emulator. It should eventually boot into the normal Android lock screen or home screen just like a device.
You can launch your emulator ahead of attempting to run your app by opening the Android Virtual Device Manager (toolbar icon in Eclipse, if installed properly) and then selecting an emulator and clicking the "Start" button. If you don't have any emulators listed, then you need to create one by clicking the "New..." button.

AVD - Changes not applied?

I made changes to an app, just changing the icons. That worked, I was able to see the results when I launched the emulator.
I tried to create a new app but when I launched the emulator again I saw my previous app. I have tried to wipe the user data but it doesn't change anything.
Edit: I saw my previous app but the new app didn't appear.
I eventually deleted the projects, the source code and then restarting eclipse but I'm still having the problems. When I launch the virtual device again it's still showing the original app. I've also tried creating a new emulator as well but I have the same .
Anyone else having this problem or know what's going on?
P.S I also tried loading the Halo theme but it doesn't load.
(Using Mac OS X Lion & Eclipse Classic 3.7 (32 bit))
Did you change the name of your applicaition package to cause this behaviour?
Just uninstall the old app from the emulator.
Menu -> Settings -> Applications -> YourApp -> Uninstall

Why doesn't logcat show anything in my Android?

Why doesn't logcat show anything in my Android (while developing apps with Eclipse)?
It just doesn't print anything. It's empty.
I had this same issue but my fix was much more basic:
If the LogCat panel is empty in Eclipse the emulator doesn't have the focus. Go to the DDMS perspective and try clicking on the 'emulator' entry in the Devices panel (top-left screen).
Dial
*#*#2846579#*#*
and you will see a hidden menu. Go to the Project Menu > Background Setting > Log setting and define the log availability (log switch) and level (log level setting).
Please note this may apply to Huawei phones only as is stated for an Ideos X3 (here) and is tested at a Honor U8860.
If clicking in Devices panel doesn't bring the spam, use reset adb in dropout menu from triangle on the right of the snapshot button.
I have the same problem on/off and the way I solved is by menu File → Restart (restart Eclipse).
Maybe you have Mylyn installed?
http://code.google.com/p/android/issues/detail?id=1808
While the answer provided by MoMo will resolve the problem temporarily it will most likely reoccur the next time you launch Eclipse, or launch on a different Emulator/Device.
Instead of always having to select my device in the devices view I've found a better solution is to go into your Eclipse preferences and navigate to Android -> LogCat in the list on the left and then enable "Monitor logcat for messages from applications in workspace".
This way no matter what device you are using logcat will automatically start showing output from it as soon as the application launches.
It will also setup a filter that ensures that only output from your application is displayed, which you can reuse / disable as needed.
Maybe the log is not enabled in your device.
Try to run the following command.
adb shell
echo 1 > /sys/kernel/logger/log_main/enable
OK. This is how I got it to work. I first followed MoMo's advice, that is...
If the LogCat panel is empty in Eclipse the emulator doesn't have the
focus. Go to the DDMS perspective and try clicking on the 'emulator'
entry in the Devices panel (top-left screen).
But to no avail.
I then attempted to reset adb (Android Debug Bridge) as suggested by fyodorananiev.
How? Menu Window → Devices → upside down triangle menu button → Reset adb.
It also didn't work, but I did get the following message:
Android hierarchyviewer: Unable to get the focused window from device
This meant that MoMo was right in that my Android device or emulator didn't have focus. However, the solution I did in my case is different.
What worked for me:
Replugged my Android device, which was connected to my computer via USB.
Restarted Eclipse, as mentioned by Abu Hamzah (although since I didn't know I can do menu File → Restart, I manually closed down Eclipse, and then restarted the application again.)
I can now see logs in my logcat.
Go to Developer settings and check that for Debugging\Select App for Debugging is empty
If you are using a device, the simplest check is to restart Eclipse.
You don't have to shutdown Eclipse
Use menu File → Restart
In a quick second or two you should see your LogCat return.
The simplest solution worked for me: Shutdown and restart my phone and Eclipse alike.
I had faced the same issue but in my case logs are shown when other devices are connected and not shown when my device is connected.
It took me days and finally, the issue resolved when I restarted my phone.
Below: Really dumb answer, but it happens!
My cat stepped on the space button while I was away and [SPACE]xN was typed in the search bar.
That resulted in an empty Log Cat. I tried restarting and wasted like 1 hour before I realized I should clear my search bar.
TLDR; CLEAR YOUR LOG CAT SEARCH BAR!
I think you haven't selected the device or emulator, on which running your application.
In Eclipse, go to DDMS Perspective and select the device or emulator on which you are running your application.
(Note: No need to restart Eclipse)
In case if you are using CyanogenMod in your mobile, it will disable logging by default. Try this method:
In your device, open "/system/etc/init.d/" folder
If there are many files, try opening each file and find for this line:
rm /dev/log/main
Now, comment this line like this: # rm /dev/log/main
Save the file and reboot.
It gets interesting when you find out that none of all the answers in for this question were helpful.
And then you find out that in your version of ADT 22.6.3.v201404151837-1123206 if you add two filters with the same package name (application name) then the log will not appear.
It was weird, because the log was there two seconds ago, and launching the app in debug mode adds a default filter for the app which collides with the filter I've setup manually, and then ADT magically removes all the logs, and none of the filter worked including the all messages (no filters)!
But it was masking another issue...
I'm working with dual screens. The second one is connected via VGA/RGB - (not really sure what it's called) and what can I do. I'm a ton more comfortable with the logcat away from my code editors, so I've placed it in another window, and as it turns out that is the main reason for the disappearing logs for me.
If using the DDMS to refocus doesn't work, try closing and restarting LogCat. That helped me.
I've had this happen occasionally. Closing and re-opening Eclipse seems to fix it.
If you tried all of the others, and still got losing on an empty logcat. I got another simple way.
Download an old version of ADB, and try again. It might be working, at least working for me with Android 7.0 phone (vendor stopped updating).
Here is the useful link for old versions.
I had the same issue. No need to restart Eclipse or clean your project. You may follow:
Click on LogCat icon on bottom right corner of eclipse.
In Saved Filter Pane (Left side), double click package of your project (in my case it's com.apps..*).
In Logcate Message Filter Settings popup, select desired option of "by Log Level". You can select verbose, info, error etc.
Click Ok.
Run/Debug your project.
This is simple.
Just close the Logcat from eclipse.
Then reopen it by following steps in Eclipse.
Window - Show View - Other - Android - LogCat - ok
Hope this solves your problem.
Many times when I switched to a new Android device, I do see no more logcat messages. Unfortunately, none of the above suggestions worked for me (Eclipse Photon 4.8.0).
I am now using this . It seems to work for different devices.
Check if the Console is telling you something. Usually this happens when the project could not be installed in the device, and just shows the previous one.
The most common case I have seen this is when there are different signatures in the project, and is not running at all.
Please, read all the red letters you see. If the LogCat does not show anything, take for sure that the Console will do.
For OnePlus devices and Ubuntu OS:
Install Wine on Ubuntu
Install ADB tools on Ubuntu
sudo apt-get install android-tools-adb
Now, attach your device to PC with USB.
Open mounted "One Plus Drivers". A disc like icon
Right click on OnePlus_USB_Drivers_setup.exe and run with Wine
Then open the terminal in the present drive where your "OnePlus_USB_Drivers_setup.exe" and other driver files exists. And run
./adb_config_Linux_OSX.sh or sh adb_config_Linux_OSX.sh
Close this terminal
Open a new terminal and run
adb server-start
Your OnePlus device should prompt you to recognise your PC as a debugging agent.
Now, run on the terminal. It should show your device.
adb devices
Reference: [SOLVED] Android Studio does not recognise my One Plus Two in Linux
Set the same date and time in your Android phone and in your laptop.
I had a similar problem of logs not showing, and when I set the correct date in the phone I started seeing the logs (I restarted the phone and the hour was completely wrong!).
What worked for me besides restarting Eclipse was:
Remove custom filters
After removing all filters, logcat was filled with text again
Close logcat and then reopen it from Window → Show View → Others.
If you're using Eclipse v4.5 (Mars) (at least, Mars.1 or Mars.2), try the solution described here: Logcat show invisible messages in Eclipse Mars.
It helped in my case.
In my case (after trying all the answers provided here to no avail), the problem (and solution) has to do with port 8700:
What I needed to do is:
Exit "Android Device Monitor" (monitor.bat)
Exit all instances of Eclipse.
C:\adt-bundle-windows-x86_64\sdk\tools>..\platform-tools\adb.exe kill-server
C:\adt-bundle-windows-x86_64\sdk\tools>..\platform-tools\adb.exe start-server
C:\adt-bundle-windows-x86_64\sdk\tools> monitor.bat
Also, the Scroll Lock button, needs to be "pressed/active":
Not the other way:

Categories

Resources