android-emulator

Android emulator failed to allocate memory 8

元气小坏坏 提交于 2019-12-17 07:58:08
问题 When I try to run my WXGA800 emulator from Eclipse it's giving an error like this Failed to allocate memory: 8 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. I checked the following links also Failed to allocate memory: 8 Android: failed to allocate memory I have tried reducing RAM size in emulator and increasing Java heapsize and ramsize but still I am facing the same error. 回答1: Update :

How to connect Visual Studio 2015 Android Emulator to network?

╄→尐↘猪︶ㄣ 提交于 2019-12-17 07:48:26
问题 I've recently installed VS 2015 RC and the Android Emulator seems to work great(it is very fast :)) except it can not connect to network. According to http://blogs.msdn.com/b/visualstudioalm/archive/2015/04/29/visual-studio-emulator-for-android-in-vs2015-rc.aspx the emulator should be able to connect to my WiFi card. I had a look at the emulator in Hyper-V Admin UI and it is configured in the same way as Windows Phone Emulator which works just fine. Any ideas? 回答1: I had the same problem,

How to connect Visual Studio 2015 Android Emulator to network?

房东的猫 提交于 2019-12-17 07:48:14
问题 I've recently installed VS 2015 RC and the Android Emulator seems to work great(it is very fast :)) except it can not connect to network. According to http://blogs.msdn.com/b/visualstudioalm/archive/2015/04/29/visual-studio-emulator-for-android-in-vs2015-rc.aspx the emulator should be able to connect to my WiFi card. I had a look at the emulator in Hyper-V Admin UI and it is configured in the same way as Windows Phone Emulator which works just fine. Any ideas? 回答1: I had the same problem,

Does the Android emulator support OpenGL ES 3.0?

只愿长相守 提交于 2019-12-17 07:47:32
问题 I know that the emulator has supported OpenGL ES 2.0 as of SDK tools 17 and Android 4.0.3, but that was introduced back in April 2012. Does the Android emulator support OpenGL ES 3.0, or are we still waiting on that? If not, does any other third-party emulator/simulator (e.g. Genymotion) support OpenGL ES 3.0? 回答1: The latest Android Emulator now supports OpenGL ES 3.0. To use OpenGL ES 3.0, your development machine needs a host GPU graphics card that supports OpenGL 3.2 or higher on

How to get the build/version number of your Android application?

情到浓时终转凉″ 提交于 2019-12-17 07:41:47
问题 I need to figure out how to get or make a build number for my Android application. I need the build number to display in the UI. Do I have to do something with AndroidManifest.xml ? 回答1: Use: try { PackageInfo pInfo = context.getPackageManager().getPackageInfo(getPackageName(), 0); String version = pInfo.versionName; } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); } And you can get the version code by using this int verCode = pInfo.versionCode; 回答2: If you're using the

Obtain root access via su on the Android emulator

半城伤御伤魂 提交于 2019-12-17 07:27:54
问题 I need to get root access via su to lunch a TcpDump binary (I am working on a sort of android sniffer). I use this code : try { Process process = Runtime.getRuntime().exec("su"); DataOutputStream os = new DataOutputStream(process.getOutputStream()); os = new DataOutputStream(process.getOutputStream()); os.writeBytes("/data/local/tcpdump-arm -c 10 -s 0 -w /data/local/out.txt\n"); os.writeBytes("exit\n"); os.flush(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace

Run Android studio emulator on AMD processor

与世无争的帅哥 提交于 2019-12-17 07:07:54
问题 Android newbie. My processor is AMD, not Intel, so I can't open the emulator in Android studio. This answer has the comment: 'You can run the ARM (non Intel) emulator image. From your list, just choose a non Intel emulation.' They don't explain where this can be found. Any ideas? Thanks Android Studio emulator and AMD CPU 回答1: Alright, first of all, open your Android SDK Manager: Tools -> Android -> SDK Manager, then chose any platform/package you want to download, expand it and select ARM

Add padding on view programmatically

对着背影说爱祢 提交于 2019-12-17 05:34:11
问题 I am deveoping Android v2.2 app. I have a fragment . In the onCreateView(...) callback of my fragment class, I inflate an layout to the fragment like below: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.login, null); return view; } The above inflated layout file is (login.xml): <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

Add padding on view programmatically

做~自己de王妃 提交于 2019-12-17 05:33:06
问题 I am deveoping Android v2.2 app. I have a fragment . In the onCreateView(...) callback of my fragment class, I inflate an layout to the fragment like below: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.login, null); return view; } The above inflated layout file is (login.xml): <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

Map not getting in emulator android api v2

痴心易碎 提交于 2019-12-17 05:13:07
问题 I want to install my map application in emulator it installed fine but not getting map on it,showing error in log cat like Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above, but I am Just seeing zoom buttons and all other UI. What i have to do to get map in emulator in android API v2. I followed this link: Running Google Maps v2 on the Android emulator 回答1: I got finally map in my emulator. I followed these steps to achieve it. Create avd and start emulator Go to