user5196931 user5196931 - 1 year ago 122
Android Question

Cannot Resolve symbol 'R' in Android Studio :"manifest merger failed with multiple errors, see logs"

I'm a beginner and I use Android Studio. A problem keeps on bothers me.

It keeps on showing "Cannot Resolve symbol 'R' " everywhere with R.XXX.XXX

I've tried:

1.checking my xml files, including manifest

2.checking SDK whether Build Tools is installed

3.clean project

4.rebuild project

5.sync project with Gradle files

6.every way I could find on Internet

while rebuilding project the message shows "manifest merger failed with multiple errors, see logs"

I briefly paste a part of my activity here:

public class Clock_mainpage extends Activity {

private Button button_start;

private static final int START_LOCATION = 1;

private Item item;

private void findButton()

button_start = (Button) findViewById(;


private Button.OnClickListener startclock = new Button.OnClickListener()
public void onClick(View view)
Intent intentMap = new Intent(Clock_mainpage.this, MapsActivity.class);

intentMap.putExtra("lat", item.getLatitude());

startActivityForResult(intentMap, START_LOCATION);


Seems it appears to be something wrong in my Manifest.xml
I post it below:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
android:versionName="1.0" >

android:targetSdkVersion="21" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="" />
<!--The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but are recommended.
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

android:theme="@style/AppTheme" />
android:label="@string/app_name" >
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
<!-- Google Service edition -->
android:value="@integer/google_play_services_version" />
<meta-data android:name=""
android:value="@integer/google_play_services_version" />

<!-- Google Map API key -->
android:value="@string/google_maps_key" />

<!-- Map component -->
android:label="@string/title_activity_maps" />




Well, this problem seems to be simple to every of you. But I wasted 3hours or more on it. Appreciate to all of you.

Answer Source

You didn't past the most important think in such problem with R a imports. Problem is known and simple. For sure you had problem with some resources. R class was not generated. You get info from IDE that R can not be found and IDE propose you quick fix: import R class.

But because your R was not generated at that point and IDE has only android.R avaliable. IDE impot android.R

Please double check imports. In import you should have:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download