Android studio not building the project gives error on Resources. “R” can not be resolvedR cannot be resolved - Android errorWhy is the Android emulator so slow? How can we speed up the Android emulator?'Must Override a Superclass Method' Errors after importing a project into Eclipse“Debug certificate expired” error in Eclipse Android pluginsHow to get the build/version number of your Android application?Remove all unused resources from an android projectHow do I add a library project to Android Studio?Android Studio: Add jar as library?Can Android Studio be used to run standard Java projects?“cannot resolve symbol R” in Android Studio

Can the attacker of a Sanctuary'd target choose not to attack anyone else?

Why doesn't a particle exert force on itself?

Drug Testing and Prescribed Medications

Is it safe to keep the GPU on 100% utilization for a very long time?

If studying in groups is more effective, why don't academics also research in groups?

Gift for mentor after his thesis defense?

Concatenate all values of the same XML element using XPath/XQuery

Explaining intravenous drug abuse to a small child

Scaling rounded rectangles in Illustrator

Clauses with 3 infinitives at the end

My large rocket is still flipping over

Which "exotic salt" can lower water's freezing point by –70 °C?

My C Drive is full without reason

Change the name of an attribute field in a shapefile without using new libraries

If an enemy monster charms one PC and tells them to attack a second PC, and then the second PC charms the monster, what happens?

Why is the blank symbol not considered part of the input alphabet of a Turing machine?

Why is a LCAO necessary within Hartree Fock?

Musical Shape on music stand

Vegetarian and vegan in Chinese

Does restarting the SQL Services (on the machine) clear the server cache (for things like query plans and statistics)?

Where do 5 or more U.S. counties meet in a single point?

Why can’t you see at the start of the Big Bang?

Crime rates in a post-scarcity economy

Can a player choose to add detail and flavor to their character's spells and abilities?



Android studio not building the project gives error on Resources. “R” can not be resolved


R cannot be resolved - Android errorWhy is the Android emulator so slow? How can we speed up the Android emulator?'Must Override a Superclass Method' Errors after importing a project into Eclipse“Debug certificate expired” error in Eclipse Android pluginsHow to get the build/version number of your Android application?Remove all unused resources from an android projectHow do I add a library project to Android Studio?Android Studio: Add jar as library?Can Android Studio be used to run standard Java projects?“cannot resolve symbol R” in Android Studio






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








-1















This error comes on my working project. I thought that this error is create because of I used icon as id in imageview, it is not resolving by rebuilding the project. When I create a new project it gives the same error on that project too.



image



Following xml is one of them. which not belongs to my project and causing the problem.



<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License
-->

<!-- Layout to be used with only max 3 actions. It has a much larger picture at the left side-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/status_bar_latest_event_content"
android:layout_width="match_parent"
android:layout_height="128dp"
>
<ImageView android:id="@+id/test_icon"
android:layout_width="128dp"
android:layout_height="128dp"
android:scaleType="centerCrop"
/>

<include layout="@layout/notification_media_cancel_action"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>

<include layout="@layout/notification_template_lines_media"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="128dp"
android:layout_marginStart="128dp"
android:layout_toLeftOf="@id/cancel_action"
android:layout_toStartOf="@id/cancel_action"/>

<LinearLayout
android:id="@+id/media_actions"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_toRightOf="@id/icon"
android:layout_toEndOf="@id/icon"
android:layout_alignParentBottom="true"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:orientation="horizontal"
android:layoutDirection="ltr"
>
<!-- media buttons will be added here -->
</LinearLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_toRightOf="@id/icon"
android:layout_toEndOf="@id/icon"
android:layout_above="@id/media_actions"
android:id="@+id/action_divider"
android:background="?android:attr/dividerHorizontal" />
</RelativeLayout>


This is my app level gradle.



apply plugin: 'com.android.application'

android
compileSdkVersion 25
buildToolsVersion "26.0.1"
defaultConfig
applicationId "com.example.usamaakmal.voicechatapplication"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

buildTypes
release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'




dependencies
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
exclude group: 'com.android.support', module: 'support-annotations'
)
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:11.0.0'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
testCompile 'junit:junit:4.12'


apply plugin: 'com.google.gms.google-services'









share|improve this question



















  • 2





    share your layout.xml with question

    – Ratilal Chopda
    Nov 9 '17 at 4:36






  • 1





    change @id/icon to @+id/icon in xml files

    – Firoz Memon
    Nov 9 '17 at 4:41











  • i cant because this is issue of v11/notification_template_big_media_narrow.xml this file not belongs to my project i think this is default template which is provide by android studio

    – Usama Akmal
    Nov 9 '17 at 4:43











  • @UsamaAkmal post your app level build.gradle file.

    – Abbas
    Nov 9 '17 at 4:46











  • @Abbas i attached in my post please check it

    – Usama Akmal
    Nov 9 '17 at 4:50

















-1















This error comes on my working project. I thought that this error is create because of I used icon as id in imageview, it is not resolving by rebuilding the project. When I create a new project it gives the same error on that project too.



image



Following xml is one of them. which not belongs to my project and causing the problem.



<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License
-->

<!-- Layout to be used with only max 3 actions. It has a much larger picture at the left side-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/status_bar_latest_event_content"
android:layout_width="match_parent"
android:layout_height="128dp"
>
<ImageView android:id="@+id/test_icon"
android:layout_width="128dp"
android:layout_height="128dp"
android:scaleType="centerCrop"
/>

<include layout="@layout/notification_media_cancel_action"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>

<include layout="@layout/notification_template_lines_media"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="128dp"
android:layout_marginStart="128dp"
android:layout_toLeftOf="@id/cancel_action"
android:layout_toStartOf="@id/cancel_action"/>

<LinearLayout
android:id="@+id/media_actions"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_toRightOf="@id/icon"
android:layout_toEndOf="@id/icon"
android:layout_alignParentBottom="true"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:orientation="horizontal"
android:layoutDirection="ltr"
>
<!-- media buttons will be added here -->
</LinearLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_toRightOf="@id/icon"
android:layout_toEndOf="@id/icon"
android:layout_above="@id/media_actions"
android:id="@+id/action_divider"
android:background="?android:attr/dividerHorizontal" />
</RelativeLayout>


This is my app level gradle.



apply plugin: 'com.android.application'

android
compileSdkVersion 25
buildToolsVersion "26.0.1"
defaultConfig
applicationId "com.example.usamaakmal.voicechatapplication"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

buildTypes
release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'




dependencies
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
exclude group: 'com.android.support', module: 'support-annotations'
)
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:11.0.0'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
testCompile 'junit:junit:4.12'


apply plugin: 'com.google.gms.google-services'









share|improve this question



















  • 2





    share your layout.xml with question

    – Ratilal Chopda
    Nov 9 '17 at 4:36






  • 1





    change @id/icon to @+id/icon in xml files

    – Firoz Memon
    Nov 9 '17 at 4:41











  • i cant because this is issue of v11/notification_template_big_media_narrow.xml this file not belongs to my project i think this is default template which is provide by android studio

    – Usama Akmal
    Nov 9 '17 at 4:43











  • @UsamaAkmal post your app level build.gradle file.

    – Abbas
    Nov 9 '17 at 4:46











  • @Abbas i attached in my post please check it

    – Usama Akmal
    Nov 9 '17 at 4:50













-1












-1








-1








This error comes on my working project. I thought that this error is create because of I used icon as id in imageview, it is not resolving by rebuilding the project. When I create a new project it gives the same error on that project too.



image



Following xml is one of them. which not belongs to my project and causing the problem.



<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License
-->

<!-- Layout to be used with only max 3 actions. It has a much larger picture at the left side-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/status_bar_latest_event_content"
android:layout_width="match_parent"
android:layout_height="128dp"
>
<ImageView android:id="@+id/test_icon"
android:layout_width="128dp"
android:layout_height="128dp"
android:scaleType="centerCrop"
/>

<include layout="@layout/notification_media_cancel_action"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>

<include layout="@layout/notification_template_lines_media"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="128dp"
android:layout_marginStart="128dp"
android:layout_toLeftOf="@id/cancel_action"
android:layout_toStartOf="@id/cancel_action"/>

<LinearLayout
android:id="@+id/media_actions"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_toRightOf="@id/icon"
android:layout_toEndOf="@id/icon"
android:layout_alignParentBottom="true"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:orientation="horizontal"
android:layoutDirection="ltr"
>
<!-- media buttons will be added here -->
</LinearLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_toRightOf="@id/icon"
android:layout_toEndOf="@id/icon"
android:layout_above="@id/media_actions"
android:id="@+id/action_divider"
android:background="?android:attr/dividerHorizontal" />
</RelativeLayout>


This is my app level gradle.



apply plugin: 'com.android.application'

android
compileSdkVersion 25
buildToolsVersion "26.0.1"
defaultConfig
applicationId "com.example.usamaakmal.voicechatapplication"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

buildTypes
release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'




dependencies
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
exclude group: 'com.android.support', module: 'support-annotations'
)
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:11.0.0'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
testCompile 'junit:junit:4.12'


apply plugin: 'com.google.gms.google-services'









share|improve this question
















This error comes on my working project. I thought that this error is create because of I used icon as id in imageview, it is not resolving by rebuilding the project. When I create a new project it gives the same error on that project too.



image



Following xml is one of them. which not belongs to my project and causing the problem.



<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License
-->

<!-- Layout to be used with only max 3 actions. It has a much larger picture at the left side-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/status_bar_latest_event_content"
android:layout_width="match_parent"
android:layout_height="128dp"
>
<ImageView android:id="@+id/test_icon"
android:layout_width="128dp"
android:layout_height="128dp"
android:scaleType="centerCrop"
/>

<include layout="@layout/notification_media_cancel_action"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>

<include layout="@layout/notification_template_lines_media"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="128dp"
android:layout_marginStart="128dp"
android:layout_toLeftOf="@id/cancel_action"
android:layout_toStartOf="@id/cancel_action"/>

<LinearLayout
android:id="@+id/media_actions"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_toRightOf="@id/icon"
android:layout_toEndOf="@id/icon"
android:layout_alignParentBottom="true"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:orientation="horizontal"
android:layoutDirection="ltr"
>
<!-- media buttons will be added here -->
</LinearLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_toRightOf="@id/icon"
android:layout_toEndOf="@id/icon"
android:layout_above="@id/media_actions"
android:id="@+id/action_divider"
android:background="?android:attr/dividerHorizontal" />
</RelativeLayout>


This is my app level gradle.



apply plugin: 'com.android.application'

android
compileSdkVersion 25
buildToolsVersion "26.0.1"
defaultConfig
applicationId "com.example.usamaakmal.voicechatapplication"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

buildTypes
release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'




dependencies
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
exclude group: 'com.android.support', module: 'support-annotations'
)
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:11.0.0'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
testCompile 'junit:junit:4.12'


apply plugin: 'com.google.gms.google-services'






java android






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 23 at 5:31









Cœur

19.7k10117157




19.7k10117157










asked Nov 9 '17 at 4:34









Usama AkmalUsama Akmal

188




188







  • 2





    share your layout.xml with question

    – Ratilal Chopda
    Nov 9 '17 at 4:36






  • 1





    change @id/icon to @+id/icon in xml files

    – Firoz Memon
    Nov 9 '17 at 4:41











  • i cant because this is issue of v11/notification_template_big_media_narrow.xml this file not belongs to my project i think this is default template which is provide by android studio

    – Usama Akmal
    Nov 9 '17 at 4:43











  • @UsamaAkmal post your app level build.gradle file.

    – Abbas
    Nov 9 '17 at 4:46











  • @Abbas i attached in my post please check it

    – Usama Akmal
    Nov 9 '17 at 4:50












  • 2





    share your layout.xml with question

    – Ratilal Chopda
    Nov 9 '17 at 4:36






  • 1





    change @id/icon to @+id/icon in xml files

    – Firoz Memon
    Nov 9 '17 at 4:41











  • i cant because this is issue of v11/notification_template_big_media_narrow.xml this file not belongs to my project i think this is default template which is provide by android studio

    – Usama Akmal
    Nov 9 '17 at 4:43











  • @UsamaAkmal post your app level build.gradle file.

    – Abbas
    Nov 9 '17 at 4:46











  • @Abbas i attached in my post please check it

    – Usama Akmal
    Nov 9 '17 at 4:50







2




2





share your layout.xml with question

– Ratilal Chopda
Nov 9 '17 at 4:36





share your layout.xml with question

– Ratilal Chopda
Nov 9 '17 at 4:36




1




1





change @id/icon to @+id/icon in xml files

– Firoz Memon
Nov 9 '17 at 4:41





change @id/icon to @+id/icon in xml files

– Firoz Memon
Nov 9 '17 at 4:41













i cant because this is issue of v11/notification_template_big_media_narrow.xml this file not belongs to my project i think this is default template which is provide by android studio

– Usama Akmal
Nov 9 '17 at 4:43





i cant because this is issue of v11/notification_template_big_media_narrow.xml this file not belongs to my project i think this is default template which is provide by android studio

– Usama Akmal
Nov 9 '17 at 4:43













@UsamaAkmal post your app level build.gradle file.

– Abbas
Nov 9 '17 at 4:46





@UsamaAkmal post your app level build.gradle file.

– Abbas
Nov 9 '17 at 4:46













@Abbas i attached in my post please check it

– Usama Akmal
Nov 9 '17 at 4:50





@Abbas i attached in my post please check it

– Usama Akmal
Nov 9 '17 at 4:50












5 Answers
5






active

oldest

votes


















1














You have modified the xml, just change the top ImageView id from test_icon to icon



For Reference, view link



Hope it helps!






share|improve this answer























  • Thanks bro but i updated my android studio, after updating it my project worked fine.

    – Usama Akmal
    Nov 11 '17 at 6:42











  • Great! Happy to know your problem is solved

    – Firoz Memon
    Nov 12 '17 at 8:30


















0














  1. you are using resources that your current layout doesn't support. Those resources are only available for Relative Layout. Check your layout again and try to change it to exact layout

  2. the id "@id/icon" is not exist.

I think your problem that there is no id such as "@id/icon". Check your ids again and fix it






share|improve this answer























  • but this file is not belong to my project. how can i edit that.

    – Usama Akmal
    Nov 9 '17 at 5:00











  • if that is a library, you can download and use it as a local library. In that case, use can fix those errors in that library but it is really difficult. I recommend you to find another library that has no error and has similar purposes for supporting your project

    – Nguyen Vu Quang
    Nov 4 '18 at 16:25











  • before that, i think you should check library's instruction again and sure that you don't miss anything

    – Nguyen Vu Quang
    Nov 4 '18 at 16:26


















0














Try 3 things, it may be help:



  1. Invalidate caches and Restart

  2. delete and Reimport your R file like :
    import your_package_name.R;

  3. check your layout proper and try to synchronise and rebuild your
    project.





share|improve this answer






























    0














    try clean/rebuild project also invalidate caches and restart option.



    File->Invalidate caches and Restart



    when you include layout the current layout doesn't have that layout's ids in its viewgroup thus it's not finding the ids.



    use the exact layout in your layout or wrap it with another parent layout






    share|improve this answer

























    • i tried but it didnt worked

      – Usama Akmal
      Nov 9 '17 at 4:37











    • did you try the invalidate caches option ?

      – himel
      Nov 9 '17 at 4:37











    • no how can i do that?

      – Usama Akmal
      Nov 9 '17 at 4:39











    • share your xml file once.

      – Whisky
      Nov 9 '17 at 4:39











    • edited my answer but also share your xml

      – himel
      Nov 9 '17 at 4:41


















    0














    By Updating android studio my issued is solved. :)






    share|improve this answer























      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
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47193966%2fandroid-studio-not-building-the-project-gives-error-on-resources-r-can-not-be%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      5 Answers
      5






      active

      oldest

      votes








      5 Answers
      5






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      You have modified the xml, just change the top ImageView id from test_icon to icon



      For Reference, view link



      Hope it helps!






      share|improve this answer























      • Thanks bro but i updated my android studio, after updating it my project worked fine.

        – Usama Akmal
        Nov 11 '17 at 6:42











      • Great! Happy to know your problem is solved

        – Firoz Memon
        Nov 12 '17 at 8:30















      1














      You have modified the xml, just change the top ImageView id from test_icon to icon



      For Reference, view link



      Hope it helps!






      share|improve this answer























      • Thanks bro but i updated my android studio, after updating it my project worked fine.

        – Usama Akmal
        Nov 11 '17 at 6:42











      • Great! Happy to know your problem is solved

        – Firoz Memon
        Nov 12 '17 at 8:30













      1












      1








      1







      You have modified the xml, just change the top ImageView id from test_icon to icon



      For Reference, view link



      Hope it helps!






      share|improve this answer













      You have modified the xml, just change the top ImageView id from test_icon to icon



      For Reference, view link



      Hope it helps!







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Nov 9 '17 at 4:58









      Firoz MemonFiroz Memon

      1,88921222




      1,88921222












      • Thanks bro but i updated my android studio, after updating it my project worked fine.

        – Usama Akmal
        Nov 11 '17 at 6:42











      • Great! Happy to know your problem is solved

        – Firoz Memon
        Nov 12 '17 at 8:30

















      • Thanks bro but i updated my android studio, after updating it my project worked fine.

        – Usama Akmal
        Nov 11 '17 at 6:42











      • Great! Happy to know your problem is solved

        – Firoz Memon
        Nov 12 '17 at 8:30
















      Thanks bro but i updated my android studio, after updating it my project worked fine.

      – Usama Akmal
      Nov 11 '17 at 6:42





      Thanks bro but i updated my android studio, after updating it my project worked fine.

      – Usama Akmal
      Nov 11 '17 at 6:42













      Great! Happy to know your problem is solved

      – Firoz Memon
      Nov 12 '17 at 8:30





      Great! Happy to know your problem is solved

      – Firoz Memon
      Nov 12 '17 at 8:30













      0














      1. you are using resources that your current layout doesn't support. Those resources are only available for Relative Layout. Check your layout again and try to change it to exact layout

      2. the id "@id/icon" is not exist.

      I think your problem that there is no id such as "@id/icon". Check your ids again and fix it






      share|improve this answer























      • but this file is not belong to my project. how can i edit that.

        – Usama Akmal
        Nov 9 '17 at 5:00











      • if that is a library, you can download and use it as a local library. In that case, use can fix those errors in that library but it is really difficult. I recommend you to find another library that has no error and has similar purposes for supporting your project

        – Nguyen Vu Quang
        Nov 4 '18 at 16:25











      • before that, i think you should check library's instruction again and sure that you don't miss anything

        – Nguyen Vu Quang
        Nov 4 '18 at 16:26















      0














      1. you are using resources that your current layout doesn't support. Those resources are only available for Relative Layout. Check your layout again and try to change it to exact layout

      2. the id "@id/icon" is not exist.

      I think your problem that there is no id such as "@id/icon". Check your ids again and fix it






      share|improve this answer























      • but this file is not belong to my project. how can i edit that.

        – Usama Akmal
        Nov 9 '17 at 5:00











      • if that is a library, you can download and use it as a local library. In that case, use can fix those errors in that library but it is really difficult. I recommend you to find another library that has no error and has similar purposes for supporting your project

        – Nguyen Vu Quang
        Nov 4 '18 at 16:25











      • before that, i think you should check library's instruction again and sure that you don't miss anything

        – Nguyen Vu Quang
        Nov 4 '18 at 16:26













      0












      0








      0







      1. you are using resources that your current layout doesn't support. Those resources are only available for Relative Layout. Check your layout again and try to change it to exact layout

      2. the id "@id/icon" is not exist.

      I think your problem that there is no id such as "@id/icon". Check your ids again and fix it






      share|improve this answer













      1. you are using resources that your current layout doesn't support. Those resources are only available for Relative Layout. Check your layout again and try to change it to exact layout

      2. the id "@id/icon" is not exist.

      I think your problem that there is no id such as "@id/icon". Check your ids again and fix it







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Nov 9 '17 at 4:49









      Nguyen Vu QuangNguyen Vu Quang

      24124




      24124












      • but this file is not belong to my project. how can i edit that.

        – Usama Akmal
        Nov 9 '17 at 5:00











      • if that is a library, you can download and use it as a local library. In that case, use can fix those errors in that library but it is really difficult. I recommend you to find another library that has no error and has similar purposes for supporting your project

        – Nguyen Vu Quang
        Nov 4 '18 at 16:25











      • before that, i think you should check library's instruction again and sure that you don't miss anything

        – Nguyen Vu Quang
        Nov 4 '18 at 16:26

















      • but this file is not belong to my project. how can i edit that.

        – Usama Akmal
        Nov 9 '17 at 5:00











      • if that is a library, you can download and use it as a local library. In that case, use can fix those errors in that library but it is really difficult. I recommend you to find another library that has no error and has similar purposes for supporting your project

        – Nguyen Vu Quang
        Nov 4 '18 at 16:25











      • before that, i think you should check library's instruction again and sure that you don't miss anything

        – Nguyen Vu Quang
        Nov 4 '18 at 16:26
















      but this file is not belong to my project. how can i edit that.

      – Usama Akmal
      Nov 9 '17 at 5:00





      but this file is not belong to my project. how can i edit that.

      – Usama Akmal
      Nov 9 '17 at 5:00













      if that is a library, you can download and use it as a local library. In that case, use can fix those errors in that library but it is really difficult. I recommend you to find another library that has no error and has similar purposes for supporting your project

      – Nguyen Vu Quang
      Nov 4 '18 at 16:25





      if that is a library, you can download and use it as a local library. In that case, use can fix those errors in that library but it is really difficult. I recommend you to find another library that has no error and has similar purposes for supporting your project

      – Nguyen Vu Quang
      Nov 4 '18 at 16:25













      before that, i think you should check library's instruction again and sure that you don't miss anything

      – Nguyen Vu Quang
      Nov 4 '18 at 16:26





      before that, i think you should check library's instruction again and sure that you don't miss anything

      – Nguyen Vu Quang
      Nov 4 '18 at 16:26











      0














      Try 3 things, it may be help:



      1. Invalidate caches and Restart

      2. delete and Reimport your R file like :
        import your_package_name.R;

      3. check your layout proper and try to synchronise and rebuild your
        project.





      share|improve this answer



























        0














        Try 3 things, it may be help:



        1. Invalidate caches and Restart

        2. delete and Reimport your R file like :
          import your_package_name.R;

        3. check your layout proper and try to synchronise and rebuild your
          project.





        share|improve this answer

























          0












          0








          0







          Try 3 things, it may be help:



          1. Invalidate caches and Restart

          2. delete and Reimport your R file like :
            import your_package_name.R;

          3. check your layout proper and try to synchronise and rebuild your
            project.





          share|improve this answer













          Try 3 things, it may be help:



          1. Invalidate caches and Restart

          2. delete and Reimport your R file like :
            import your_package_name.R;

          3. check your layout proper and try to synchronise and rebuild your
            project.






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 9 '17 at 4:58









          chari sharmachari sharma

          677




          677





















              0














              try clean/rebuild project also invalidate caches and restart option.



              File->Invalidate caches and Restart



              when you include layout the current layout doesn't have that layout's ids in its viewgroup thus it's not finding the ids.



              use the exact layout in your layout or wrap it with another parent layout






              share|improve this answer

























              • i tried but it didnt worked

                – Usama Akmal
                Nov 9 '17 at 4:37











              • did you try the invalidate caches option ?

                – himel
                Nov 9 '17 at 4:37











              • no how can i do that?

                – Usama Akmal
                Nov 9 '17 at 4:39











              • share your xml file once.

                – Whisky
                Nov 9 '17 at 4:39











              • edited my answer but also share your xml

                – himel
                Nov 9 '17 at 4:41















              0














              try clean/rebuild project also invalidate caches and restart option.



              File->Invalidate caches and Restart



              when you include layout the current layout doesn't have that layout's ids in its viewgroup thus it's not finding the ids.



              use the exact layout in your layout or wrap it with another parent layout






              share|improve this answer

























              • i tried but it didnt worked

                – Usama Akmal
                Nov 9 '17 at 4:37











              • did you try the invalidate caches option ?

                – himel
                Nov 9 '17 at 4:37











              • no how can i do that?

                – Usama Akmal
                Nov 9 '17 at 4:39











              • share your xml file once.

                – Whisky
                Nov 9 '17 at 4:39











              • edited my answer but also share your xml

                – himel
                Nov 9 '17 at 4:41













              0












              0








              0







              try clean/rebuild project also invalidate caches and restart option.



              File->Invalidate caches and Restart



              when you include layout the current layout doesn't have that layout's ids in its viewgroup thus it's not finding the ids.



              use the exact layout in your layout or wrap it with another parent layout






              share|improve this answer















              try clean/rebuild project also invalidate caches and restart option.



              File->Invalidate caches and Restart



              when you include layout the current layout doesn't have that layout's ids in its viewgroup thus it's not finding the ids.



              use the exact layout in your layout or wrap it with another parent layout







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Nov 9 '17 at 4:59

























              answered Nov 9 '17 at 4:36









              himelhimel

              300310




              300310












              • i tried but it didnt worked

                – Usama Akmal
                Nov 9 '17 at 4:37











              • did you try the invalidate caches option ?

                – himel
                Nov 9 '17 at 4:37











              • no how can i do that?

                – Usama Akmal
                Nov 9 '17 at 4:39











              • share your xml file once.

                – Whisky
                Nov 9 '17 at 4:39











              • edited my answer but also share your xml

                – himel
                Nov 9 '17 at 4:41

















              • i tried but it didnt worked

                – Usama Akmal
                Nov 9 '17 at 4:37











              • did you try the invalidate caches option ?

                – himel
                Nov 9 '17 at 4:37











              • no how can i do that?

                – Usama Akmal
                Nov 9 '17 at 4:39











              • share your xml file once.

                – Whisky
                Nov 9 '17 at 4:39











              • edited my answer but also share your xml

                – himel
                Nov 9 '17 at 4:41
















              i tried but it didnt worked

              – Usama Akmal
              Nov 9 '17 at 4:37





              i tried but it didnt worked

              – Usama Akmal
              Nov 9 '17 at 4:37













              did you try the invalidate caches option ?

              – himel
              Nov 9 '17 at 4:37





              did you try the invalidate caches option ?

              – himel
              Nov 9 '17 at 4:37













              no how can i do that?

              – Usama Akmal
              Nov 9 '17 at 4:39





              no how can i do that?

              – Usama Akmal
              Nov 9 '17 at 4:39













              share your xml file once.

              – Whisky
              Nov 9 '17 at 4:39





              share your xml file once.

              – Whisky
              Nov 9 '17 at 4:39













              edited my answer but also share your xml

              – himel
              Nov 9 '17 at 4:41





              edited my answer but also share your xml

              – himel
              Nov 9 '17 at 4:41











              0














              By Updating android studio my issued is solved. :)






              share|improve this answer



























                0














                By Updating android studio my issued is solved. :)






                share|improve this answer

























                  0












                  0








                  0







                  By Updating android studio my issued is solved. :)






                  share|improve this answer













                  By Updating android studio my issued is solved. :)







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 7 '18 at 8:00









                  Usama AkmalUsama Akmal

                  188




                  188



























                      draft saved

                      draft discarded
















































                      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.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47193966%2fandroid-studio-not-building-the-project-gives-error-on-resources-r-can-not-be%23new-answer', 'question_page');

                      );

                      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







                      Popular posts from this blog

                      SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                      용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

                      155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해