2014-10-18 5 views
3

У меня большие проблемы с Android Studio. Недавно я сделал чек из проекта, который я разрабатывал с моим другом, и когда я его открываю, все R в проекте обращаются в RED («не может разрешить символ R»).Проблемы с Android Studio! Не удается разрешить символ R, Ресурс не найден, который соответствует указанному имени.

Я искал ответ на эту проблему и пробовал почти все ... Sync Gradle, Grade Clean и т. Д. О, и когда я использую Build -> Clean Project, он возвращает 118 ошибок. является (почти полной) консолью OUTPUT:

Executing tasks: [:app:assembleDebug] 

Configuration on demand is an incubating feature. 
Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0 
:app:preBuild 
:app:compileDebugNdk 
:app:preDebugBuild 
:app:checkDebugManifest 
:app:preReleaseBuild 
:app:prepareComAndroidSupportAppcompatV72100Library UP-TO-DATE 
:app:prepareComAndroidSupportSupportV42100Library UP-TO-DATE 
:app:prepareDebugDependencies 
:app:compileDebugAidl UP-TO-DATE 
:app:compileDebugRenderscript UP-TO-DATE 
:app:generateDebugBuildConfig UP-TO-DATE 
:app:generateDebugAssets UP-TO-DATE 
:app:mergeDebugAssets UP-TO-DATE 
:app:generateDebugResValues UP-TO-DATE 
:app:generateDebugResources UP-TO-DATE 
:app:mergeDebugResources UP-TO-DATE 
:app:processDebugManifest UP-TO-DATE 
:app:processDebugResources 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:9: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body1'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:11: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body2'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:13: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:15: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Caption'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:17: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display1'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display2'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:21: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display3'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:23: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display4'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:25: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Headline'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:27: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Inverse'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:29: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:31: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large.Inverse'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:33: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:35: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:37: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:39: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium.Inverse'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:41: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Menu'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:43: error: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Subtitle'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:45: error: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Title'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:47: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:49: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small.Inverse'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:51: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Subhead'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:53: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Title'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:55: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:57: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:59: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle.Inverse'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:61: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:63: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title.Inverse'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:65: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Subtitle'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:67: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Title'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:69: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:71: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:73: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:75: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:77: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v11\values.xml:39: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v14\values.xml:12: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v11\values.xml:46: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v14\values.xml:20: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v11\values.xml:53: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v14\values.xml:28: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v11\values.xml:60: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v14\values.xml:36: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:87: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:89: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.ActionBar'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:93: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:100: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark.ActionBar'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:108: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Light'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:267: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabText'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:269: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabView'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:271: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:273: error: Error retrieving parent for item: No resource found that matches the given 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:259: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'. 
C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug\values-v21\values.xml:260: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'. 

FAILED 

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':app:processDebugResources'. 
> com.android.ide.common.internal.LoggedErrorException: Failed to run command: 
    C:\Users\Juliano\Downloads\Compressed\adt-bundle-windows-x86_64-20140321\adt-bundle-windows-x86_64-20140321\sdk\build-tools\20.0.0\aapt.exe package -f --no-crunch -I C:\Users\Juliano\Downloads\Compressed\adt-bundle-windows-x86_64-20140321\adt-bundle-windows-x86_64-20140321\sdk\platforms\android-14\android.jar -M C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\manifests\debug\AndroidManifest.xml -S C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\res\debug -A C:\Users\Juliano\Documents\Projects\HueLoc\app\build\intermediates\assets\debug -m -J C:\Users\Juliano\Documents\Projects\HueLoc\app\build\generated\source\r\debug -F 

* Try: 
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 

BUILD FAILED 

Total time: 9.873 secs 

Да, это он .. Пожалуйста, кто-нибудь мне поможет! (Я использую W7, последнюю версию Android Studio)

// UPDATE: Я исправил его, удалив файл value.xml в папке «value21» ... очевидно, у Android Studio было обновление, и это заставило меня используйте Android L ... Я изменил версию библиотеки appcompat до 19 (я использовал 21, поэтому я сделал понижение) в build.grade моего проекта (в зависимостях) ...

+0

http://stackoverflow.com/questions/17054000/cannot-resolve-symbol-r-android-studio – Praveen

+0

кажется проект использует дизайн материал? Если это так, убедитесь, что вы используете SDK 21. – Emmanuel

ответ

4

I используется для получения ошибки «R» все время. Исправление включало следующие этапы:
-Проверьте файлы build.gradle на наличии ошибок или предупреждения
-Restart Android Студия
-check для стабильных обновлений версии
менеджер -Open SDK и получить убедитесь, что все новые пакеты и устанавливается обновление
- (иногда) перестроен проект
-sync Gradle

Смежные вопросы