Android Studio error: “Manifest merger failed: Apps targeting Android 12”

I have updated my emulator version and Android SDK version to Android S (Android 12). After the update, I cannot run the project. I cannot run a Hello, World! project (empty project), but I can build Gradle as well as, but I can not run the project. I always got the error: Manifest merger failed: … Read more

The Android emulator is not starting, showing “invalid command-line parameter”

I made a simple “Hello World” program in Eclipse. I added nothing to a Java file and only added a text view in file main.xml as //main.xml file <?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:orientation=”vertical” android:layout_width=”fill_parent” android:layout_height=”fill_parent” > <TextView android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:text=”Hello World” /> </LinearLayout> And now when I run my program it shows the following … Read more

How do I “shake” an Android device within the Android emulator to bring up the dev menu to debug my React Native app

I am working on a cross-platform React Native mobile app. I am writing console.log statements as I develop. I want to see these logging statements in Chrome while I’m running the Android app in the default Android emulator. According to Facebook’s docs I just need to “shake the device”. How do I do this in … Read more

Accessing localhost:port from Android emulator

I’m running a web service on my local machine that runs at localhost:54722. I want to call the service from an app running in the Android emulator. I read that using 10.0.2.2 in the app would access localhost, but it doesn’t seem to work with the port number as well. It says HttpResponseException: Bad Request. … Read more

Add padding on view programmatically

I am developing 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″?> … Read more

Error “The connection to adb is down, and a severe error has occurred.”

I’ve spent days trying to launch any Android program. Even “Hello World” gives me the same error: “The connection to adb is down, and a severe error has occurred”. I’m running Eclipse v3.5 (Galileo), Google APIs 2.2.8, on a Windows XP machine. I’ve used all the tricks I can find on the web: the command line … Read more