'cannot resolve symbol R' android studio error
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
Execution failed for task :app:mergeDebugResources
.
What is this error and how to I fix it?
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information. -->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
This is my xml above... and below is onCreate()
where setContentView(R.layout.activity_main)
is causing the problem:
cannot resolve symbol R
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
provider = locationManager.getBestProvider(new Criteria(), false);
// ATTENTION: This was auto-generated to implement the App Indexing API.
// See https://g.co/AppIndexing/AndroidStudio for more information.
client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
}
java android xml android-studio
add a comment |
Execution failed for task :app:mergeDebugResources
.
What is this error and how to I fix it?
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information. -->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
This is my xml above... and below is onCreate()
where setContentView(R.layout.activity_main)
is causing the problem:
cannot resolve symbol R
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
provider = locationManager.getBestProvider(new Criteria(), false);
// ATTENTION: This was auto-generated to implement the App Indexing API.
// See https://g.co/AppIndexing/AndroidStudio for more information.
client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
}
java android xml android-studio
2
Clean-Rebuild-Restart
& importimport PackageName.R
– IntelliJ Amiya
Feb 8 '16 at 5:13
make sure all resource as same package in manifest .mainactivity is with red sign?
– Ajay Pandya
Feb 8 '16 at 5:16
1
When you build your project there is no warning or error? Also try to close and open AS again, sometimes that works for me
– Gueorgui Obregon
Feb 8 '16 at 5:25
1
Did you check are there any errors in xml files, Then cleaning the project and running should fix this !
– Devrath
Feb 8 '16 at 5:28
Cleaning and running isn't fixing the problem. There are no errors in the xml. the only error is coming form the symbol R
– Adam Goldberg
Feb 8 '16 at 5:32
add a comment |
Execution failed for task :app:mergeDebugResources
.
What is this error and how to I fix it?
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information. -->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
This is my xml above... and below is onCreate()
where setContentView(R.layout.activity_main)
is causing the problem:
cannot resolve symbol R
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
provider = locationManager.getBestProvider(new Criteria(), false);
// ATTENTION: This was auto-generated to implement the App Indexing API.
// See https://g.co/AppIndexing/AndroidStudio for more information.
client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
}
java android xml android-studio
Execution failed for task :app:mergeDebugResources
.
What is this error and how to I fix it?
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information. -->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
This is my xml above... and below is onCreate()
where setContentView(R.layout.activity_main)
is causing the problem:
cannot resolve symbol R
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
provider = locationManager.getBestProvider(new Criteria(), false);
// ATTENTION: This was auto-generated to implement the App Indexing API.
// See https://g.co/AppIndexing/AndroidStudio for more information.
client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
}
java android xml android-studio
java android xml android-studio
edited Feb 8 '16 at 7:49
Sreehari
4,24911642
4,24911642
asked Feb 8 '16 at 5:10
Adam GoldbergAdam Goldberg
93311
93311
2
Clean-Rebuild-Restart
& importimport PackageName.R
– IntelliJ Amiya
Feb 8 '16 at 5:13
make sure all resource as same package in manifest .mainactivity is with red sign?
– Ajay Pandya
Feb 8 '16 at 5:16
1
When you build your project there is no warning or error? Also try to close and open AS again, sometimes that works for me
– Gueorgui Obregon
Feb 8 '16 at 5:25
1
Did you check are there any errors in xml files, Then cleaning the project and running should fix this !
– Devrath
Feb 8 '16 at 5:28
Cleaning and running isn't fixing the problem. There are no errors in the xml. the only error is coming form the symbol R
– Adam Goldberg
Feb 8 '16 at 5:32
add a comment |
2
Clean-Rebuild-Restart
& importimport PackageName.R
– IntelliJ Amiya
Feb 8 '16 at 5:13
make sure all resource as same package in manifest .mainactivity is with red sign?
– Ajay Pandya
Feb 8 '16 at 5:16
1
When you build your project there is no warning or error? Also try to close and open AS again, sometimes that works for me
– Gueorgui Obregon
Feb 8 '16 at 5:25
1
Did you check are there any errors in xml files, Then cleaning the project and running should fix this !
– Devrath
Feb 8 '16 at 5:28
Cleaning and running isn't fixing the problem. There are no errors in the xml. the only error is coming form the symbol R
– Adam Goldberg
Feb 8 '16 at 5:32
2
2
Clean-Rebuild-Restart
& import import PackageName.R
– IntelliJ Amiya
Feb 8 '16 at 5:13
Clean-Rebuild-Restart
& import import PackageName.R
– IntelliJ Amiya
Feb 8 '16 at 5:13
make sure all resource as same package in manifest .mainactivity is with red sign?
– Ajay Pandya
Feb 8 '16 at 5:16
make sure all resource as same package in manifest .mainactivity is with red sign?
– Ajay Pandya
Feb 8 '16 at 5:16
1
1
When you build your project there is no warning or error? Also try to close and open AS again, sometimes that works for me
– Gueorgui Obregon
Feb 8 '16 at 5:25
When you build your project there is no warning or error? Also try to close and open AS again, sometimes that works for me
– Gueorgui Obregon
Feb 8 '16 at 5:25
1
1
Did you check are there any errors in xml files, Then cleaning the project and running should fix this !
– Devrath
Feb 8 '16 at 5:28
Did you check are there any errors in xml files, Then cleaning the project and running should fix this !
– Devrath
Feb 8 '16 at 5:28
Cleaning and running isn't fixing the problem. There are no errors in the xml. the only error is coming form the symbol R
– Adam Goldberg
Feb 8 '16 at 5:32
Cleaning and running isn't fixing the problem. There are no errors in the xml. the only error is coming form the symbol R
– Adam Goldberg
Feb 8 '16 at 5:32
add a comment |
6 Answers
6
active
oldest
votes
Another solution, If anyone need it
I was using gradle 3.3.0. It was the main culprit. Wasted 6.50 hours from my life. Gradle 3.2.1 removed the error.
classpath 'com.android.tools.build:gradle:3.2.1'
Worked for me! Thank you!
– alex87
Feb 1 at 6:45
Worked for me!! Ideally, Gradle plugin version given in script(build.gradle of project) should match gradle plugin version of IDE
– Rishab Jaiswal
Apr 10 at 6:10
add a comment |
'cannot resolve symbol R' error usually occurs and the 'symbol R' turns red in color whenever the gradle sync is not completed.
Hence before running any project it is always advisable to first sync the project if any dependencies or anything have been added and then clean the project and then run it.
It should solve your problem.
add a comment |
R
is predefined class in android.
you should clean your project and then build it again. it will resolve R
.
Or there is an error somewhere that isn't obvious and it can't automatically be generated
– cricket_007
Feb 8 '16 at 5:30
But there are only two possibilities, eitherR
is not imported properly or its not used properly. so in most of the cases it resolve using clean and build process.
– ojus kulkarni
Feb 8 '16 at 5:47
A clean and a build won't fix improper layout xml, which causes R not to be generated, that's all I'm saying
– cricket_007
Feb 8 '16 at 5:50
add a comment |
Go to the file directory.
- Click "app"
- Click "com.example.?????"
- Right Click
- Hover over "New"
- Click on "Java Class"
- Name the file "R" and leave the other things blank & accept the defaults
- Click OK
You have finished the first part! - Click File
- Hover over "New"
- Click "New Project"
- Accept all defaults until you've reached the layout xml file
- Click "app"
- Click "com.example.android.?????"
- Click "R"
- Select all
- Go back to your old file
- Paste
- Finished!
add a comment |
probably your gradle sync failed , that is why it cannot be resolved resync the gradle or you have not imported yourpackagename.R
;
add a comment |
Only this solution worked for me:
1- Go to your app directory -> /app/src/main/res/
2- Delete folder XML (Make sure that you don't have important files inside it)
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f35262690%2fcannot-resolve-symbol-r-android-studio-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
Another solution, If anyone need it
I was using gradle 3.3.0. It was the main culprit. Wasted 6.50 hours from my life. Gradle 3.2.1 removed the error.
classpath 'com.android.tools.build:gradle:3.2.1'
Worked for me! Thank you!
– alex87
Feb 1 at 6:45
Worked for me!! Ideally, Gradle plugin version given in script(build.gradle of project) should match gradle plugin version of IDE
– Rishab Jaiswal
Apr 10 at 6:10
add a comment |
Another solution, If anyone need it
I was using gradle 3.3.0. It was the main culprit. Wasted 6.50 hours from my life. Gradle 3.2.1 removed the error.
classpath 'com.android.tools.build:gradle:3.2.1'
Worked for me! Thank you!
– alex87
Feb 1 at 6:45
Worked for me!! Ideally, Gradle plugin version given in script(build.gradle of project) should match gradle plugin version of IDE
– Rishab Jaiswal
Apr 10 at 6:10
add a comment |
Another solution, If anyone need it
I was using gradle 3.3.0. It was the main culprit. Wasted 6.50 hours from my life. Gradle 3.2.1 removed the error.
classpath 'com.android.tools.build:gradle:3.2.1'
Another solution, If anyone need it
I was using gradle 3.3.0. It was the main culprit. Wasted 6.50 hours from my life. Gradle 3.2.1 removed the error.
classpath 'com.android.tools.build:gradle:3.2.1'
answered Jan 21 at 9:06
SHAH MD MONIRUL ISLAMSHAH MD MONIRUL ISLAM
2,58041532
2,58041532
Worked for me! Thank you!
– alex87
Feb 1 at 6:45
Worked for me!! Ideally, Gradle plugin version given in script(build.gradle of project) should match gradle plugin version of IDE
– Rishab Jaiswal
Apr 10 at 6:10
add a comment |
Worked for me! Thank you!
– alex87
Feb 1 at 6:45
Worked for me!! Ideally, Gradle plugin version given in script(build.gradle of project) should match gradle plugin version of IDE
– Rishab Jaiswal
Apr 10 at 6:10
Worked for me! Thank you!
– alex87
Feb 1 at 6:45
Worked for me! Thank you!
– alex87
Feb 1 at 6:45
Worked for me!! Ideally, Gradle plugin version given in script(build.gradle of project) should match gradle plugin version of IDE
– Rishab Jaiswal
Apr 10 at 6:10
Worked for me!! Ideally, Gradle plugin version given in script(build.gradle of project) should match gradle plugin version of IDE
– Rishab Jaiswal
Apr 10 at 6:10
add a comment |
'cannot resolve symbol R' error usually occurs and the 'symbol R' turns red in color whenever the gradle sync is not completed.
Hence before running any project it is always advisable to first sync the project if any dependencies or anything have been added and then clean the project and then run it.
It should solve your problem.
add a comment |
'cannot resolve symbol R' error usually occurs and the 'symbol R' turns red in color whenever the gradle sync is not completed.
Hence before running any project it is always advisable to first sync the project if any dependencies or anything have been added and then clean the project and then run it.
It should solve your problem.
add a comment |
'cannot resolve symbol R' error usually occurs and the 'symbol R' turns red in color whenever the gradle sync is not completed.
Hence before running any project it is always advisable to first sync the project if any dependencies or anything have been added and then clean the project and then run it.
It should solve your problem.
'cannot resolve symbol R' error usually occurs and the 'symbol R' turns red in color whenever the gradle sync is not completed.
Hence before running any project it is always advisable to first sync the project if any dependencies or anything have been added and then clean the project and then run it.
It should solve your problem.
answered Feb 8 '16 at 7:10
UserName_UntoldUserName_Untold
145112
145112
add a comment |
add a comment |
R
is predefined class in android.
you should clean your project and then build it again. it will resolve R
.
Or there is an error somewhere that isn't obvious and it can't automatically be generated
– cricket_007
Feb 8 '16 at 5:30
But there are only two possibilities, eitherR
is not imported properly or its not used properly. so in most of the cases it resolve using clean and build process.
– ojus kulkarni
Feb 8 '16 at 5:47
A clean and a build won't fix improper layout xml, which causes R not to be generated, that's all I'm saying
– cricket_007
Feb 8 '16 at 5:50
add a comment |
R
is predefined class in android.
you should clean your project and then build it again. it will resolve R
.
Or there is an error somewhere that isn't obvious and it can't automatically be generated
– cricket_007
Feb 8 '16 at 5:30
But there are only two possibilities, eitherR
is not imported properly or its not used properly. so in most of the cases it resolve using clean and build process.
– ojus kulkarni
Feb 8 '16 at 5:47
A clean and a build won't fix improper layout xml, which causes R not to be generated, that's all I'm saying
– cricket_007
Feb 8 '16 at 5:50
add a comment |
R
is predefined class in android.
you should clean your project and then build it again. it will resolve R
.
R
is predefined class in android.
you should clean your project and then build it again. it will resolve R
.
answered Feb 8 '16 at 5:27
ojus kulkarniojus kulkarni
1,51221634
1,51221634
Or there is an error somewhere that isn't obvious and it can't automatically be generated
– cricket_007
Feb 8 '16 at 5:30
But there are only two possibilities, eitherR
is not imported properly or its not used properly. so in most of the cases it resolve using clean and build process.
– ojus kulkarni
Feb 8 '16 at 5:47
A clean and a build won't fix improper layout xml, which causes R not to be generated, that's all I'm saying
– cricket_007
Feb 8 '16 at 5:50
add a comment |
Or there is an error somewhere that isn't obvious and it can't automatically be generated
– cricket_007
Feb 8 '16 at 5:30
But there are only two possibilities, eitherR
is not imported properly or its not used properly. so in most of the cases it resolve using clean and build process.
– ojus kulkarni
Feb 8 '16 at 5:47
A clean and a build won't fix improper layout xml, which causes R not to be generated, that's all I'm saying
– cricket_007
Feb 8 '16 at 5:50
Or there is an error somewhere that isn't obvious and it can't automatically be generated
– cricket_007
Feb 8 '16 at 5:30
Or there is an error somewhere that isn't obvious and it can't automatically be generated
– cricket_007
Feb 8 '16 at 5:30
But there are only two possibilities, either
R
is not imported properly or its not used properly. so in most of the cases it resolve using clean and build process.– ojus kulkarni
Feb 8 '16 at 5:47
But there are only two possibilities, either
R
is not imported properly or its not used properly. so in most of the cases it resolve using clean and build process.– ojus kulkarni
Feb 8 '16 at 5:47
A clean and a build won't fix improper layout xml, which causes R not to be generated, that's all I'm saying
– cricket_007
Feb 8 '16 at 5:50
A clean and a build won't fix improper layout xml, which causes R not to be generated, that's all I'm saying
– cricket_007
Feb 8 '16 at 5:50
add a comment |
Go to the file directory.
- Click "app"
- Click "com.example.?????"
- Right Click
- Hover over "New"
- Click on "Java Class"
- Name the file "R" and leave the other things blank & accept the defaults
- Click OK
You have finished the first part! - Click File
- Hover over "New"
- Click "New Project"
- Accept all defaults until you've reached the layout xml file
- Click "app"
- Click "com.example.android.?????"
- Click "R"
- Select all
- Go back to your old file
- Paste
- Finished!
add a comment |
Go to the file directory.
- Click "app"
- Click "com.example.?????"
- Right Click
- Hover over "New"
- Click on "Java Class"
- Name the file "R" and leave the other things blank & accept the defaults
- Click OK
You have finished the first part! - Click File
- Hover over "New"
- Click "New Project"
- Accept all defaults until you've reached the layout xml file
- Click "app"
- Click "com.example.android.?????"
- Click "R"
- Select all
- Go back to your old file
- Paste
- Finished!
add a comment |
Go to the file directory.
- Click "app"
- Click "com.example.?????"
- Right Click
- Hover over "New"
- Click on "Java Class"
- Name the file "R" and leave the other things blank & accept the defaults
- Click OK
You have finished the first part! - Click File
- Hover over "New"
- Click "New Project"
- Accept all defaults until you've reached the layout xml file
- Click "app"
- Click "com.example.android.?????"
- Click "R"
- Select all
- Go back to your old file
- Paste
- Finished!
Go to the file directory.
- Click "app"
- Click "com.example.?????"
- Right Click
- Hover over "New"
- Click on "Java Class"
- Name the file "R" and leave the other things blank & accept the defaults
- Click OK
You have finished the first part! - Click File
- Hover over "New"
- Click "New Project"
- Accept all defaults until you've reached the layout xml file
- Click "app"
- Click "com.example.android.?????"
- Click "R"
- Select all
- Go back to your old file
- Paste
- Finished!
edited Aug 12 '18 at 16:34
Stanislav Kralin
7,98942043
7,98942043
answered Aug 12 '18 at 16:17
Franklin LeeFranklin Lee
112
112
add a comment |
add a comment |
probably your gradle sync failed , that is why it cannot be resolved resync the gradle or you have not imported yourpackagename.R
;
add a comment |
probably your gradle sync failed , that is why it cannot be resolved resync the gradle or you have not imported yourpackagename.R
;
add a comment |
probably your gradle sync failed , that is why it cannot be resolved resync the gradle or you have not imported yourpackagename.R
;
probably your gradle sync failed , that is why it cannot be resolved resync the gradle or you have not imported yourpackagename.R
;
answered Feb 8 '16 at 5:14
Cold FireCold Fire
11k62751
11k62751
add a comment |
add a comment |
Only this solution worked for me:
1- Go to your app directory -> /app/src/main/res/
2- Delete folder XML (Make sure that you don't have important files inside it)
add a comment |
Only this solution worked for me:
1- Go to your app directory -> /app/src/main/res/
2- Delete folder XML (Make sure that you don't have important files inside it)
add a comment |
Only this solution worked for me:
1- Go to your app directory -> /app/src/main/res/
2- Delete folder XML (Make sure that you don't have important files inside it)
Only this solution worked for me:
1- Go to your app directory -> /app/src/main/res/
2- Delete folder XML (Make sure that you don't have important files inside it)
edited Jan 6 at 14:35
answered Jan 4 at 14:13
زيادزياد
49359
49359
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f35262690%2fcannot-resolve-symbol-r-android-studio-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Clean-Rebuild-Restart
& importimport PackageName.R
– IntelliJ Amiya
Feb 8 '16 at 5:13
make sure all resource as same package in manifest .mainactivity is with red sign?
– Ajay Pandya
Feb 8 '16 at 5:16
1
When you build your project there is no warning or error? Also try to close and open AS again, sometimes that works for me
– Gueorgui Obregon
Feb 8 '16 at 5:25
1
Did you check are there any errors in xml files, Then cleaning the project and running should fix this !
– Devrath
Feb 8 '16 at 5:28
Cleaning and running isn't fixing the problem. There are no errors in the xml. the only error is coming form the symbol R
– Adam Goldberg
Feb 8 '16 at 5:32