android-emulator

connection refused when trying to connect to my REST server from android emulator

折月煮酒 提交于 2019-12-09 18:05:10
问题 consider the following android code and please solve my problem: There is REST server running on my laptop..i can access that server from my browser and get proper resuts...but now i want to use it from my android emulator that is also running on my laptop using following code.. // String URL = "http://localhost:8080/server/rest/user/1"; String URL = "http://www.google.com"; HttpClient httpclient = new DefaultHttpClient(); HttpGet request = new HttpGet(URL); HttpResponse result = httpclient

How to embed one layout inside another in my case?

﹥>﹥吖頭↗ 提交于 2019-12-09 17:04:52
问题 If I have a layout called bottom.xml , bottom.xml: (simply contain a textview and edit text view) <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:orientation="vertical" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:gravity="center_horizontal" android:text="

How do I specify which network interface the Android emulator should use on my development machine?

三世轮回 提交于 2019-12-09 16:02:34
问题 My development machine is simultaneously connected to two different networks. One is through ethernet (eth0), and the other is WiFi (en1). In this situation, the Android emulator appears to always want to reach out to the network on eth0. When starting the emulator from the command line, is there an option where I can tell it to use a specific network interface on the development machine (en1 in my case)? It seems like this should be possible through args you can pass to the -qemu flag .

Unfortunately app has stopped in Android Emulator

≯℡__Kan透↙ 提交于 2019-12-09 14:19:58
问题 I am new to Android and I am trying a few small apps (like Compass). When I run the app in the emulator, it gives the message Unfortunately, Compass has Stopped . I have no compile time errors. How do I solve this, and what is causing this? Thanks in advance. 回答1: I had the same error message and found that, in commenting out uses-permission nodes in AndroidManifest.xml I had commented out one that was needed. When I put it back in the app ran fine. I was able to reproduce the error. I needed

How to make such animation in android? [closed]

雨燕双飞 提交于 2019-12-09 14:00:20
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 months ago . In My Android Application the view is like this image: Now, Here D is small part which is any view or may ve button. I want is, If the User click on that "D" part, the view appear in the different color should be translate in to the Left to right way and Only the "D" part appear

Warning: Activity not started, its current task has been brought to the front [duplicate]

百般思念 提交于 2019-12-09 13:34:57
问题 This question already has answers here : Activity not started, its current task has been brought to the front (8 answers) Closed 5 years ago . I think this question is very usual. Many results on Stackoverflow has said about this. The general answer is: because an old app is running, and I try to run a new one from Eclipse (but no change in compile), so Android will notice this. But, I have done many things as I could: change something for eclipse rebuild again. Restart Eclipse or Emulator

how to set the tabs in the bottom of the screen in android?

强颜欢笑 提交于 2019-12-09 11:32:50
问题 i am working on tabactivity. i wanna show my tabwidget below the tabcontent(framelayout). i done it by setting the tabwiget tab attribute as android:gravity="bottom" but the framelayout cant align with those tabs. that is the tabs are shown at the bottom of the screen and overlap the framelayout how to do that? if set some height value to the framelayout it not optimized for all screens of android. what can i do? any idea??? 回答1: or just use a custom one from: http://code.google.com/p

Send Intent to App in Emulator

你。 提交于 2019-12-09 10:26:48
问题 Is it somehow possible to send automated intents to an app inside an emulator for testing? I have a list of all my intents and I want to test them automaticily, so is it possible to just do a adb shell <myfancycommand> android.intent.action.PACKAGE_ADDED to initiate the android.intent.action.PACKAGE_ADDED action on the device? Or do I have to write a script that calls all the stuff by its own, so for example for this intent install a dummy apk on the device? 回答1: Even more simple is the use

Running Android emulator with -noaudio option returns “qemu-system-i386.exe: -audio: invalid option”

那年仲夏 提交于 2019-12-09 09:13:25
问题 I'm running Windows 10, 64 bit, Android Studio 2.2.2. When creating an AVD from the Android SDK's AVD Manager, I don't see an option to completeley disable audio (input and output). I'm using Android SDK which has verion of Android Tools 25.2.2). In older AVD manager, i recall that option to completely disable audio on AVD was present. When I want to create a batch script, to run with -noaudio option, as mentioned in the Google's official Control the Emulator from the Command Line page, I'm

Android studio Emulator ( device unauthorized)

拥有回忆 提交于 2019-12-09 08:08:58
问题 I know that on a normal device I have to authorize the debugging process, but Authorizing it on an emulator is my first time. I just installed my first emulator on my home pc to do some work stuff, and this poped up. Any idea what is the cause or is it normal for android o api 26 google play SDK? PS: I am using windows version at home. 回答1: Issue Resolved. Step 1- Made a new emulator(Any). Step 2- then fixed another problem the black screen by changing the settings to use hardware graphics.