When I started Android Studio I got a bunch of error messages saying a bunch of plugins were missing or uninstalled or whatever. I restarted Android Studio a couple of times and it seemed as though that problem fixed itself. (No idea what was going on there.)
Then a new problem arised. The project I have been working on seems to be damaged/corrupt. I don't know how or why. Here's what it says:
Information:Gradle tasks [:app:assembleDebug] C:\Users\Peter\AndroidStudioProjects\AlarmClock\app\build\intermediates\res\merged\debug\values-v23\values-v23.xml Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'. Error:(34) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'. Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'. Error:(34) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'. C:\Users\Peter\AndroidStudioProjects\AlarmClock\app\build\intermediates\res\merged\debug\values-v24\values-v24.xml Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'. Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'. Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt Information:BUILD FAILED Information:Total time: 1.255 secs
I booted up another project and it worked just fine.
The last thing I did with the corrupt project was change something (not sure why) and as a result it would crash every time I clicked a certain button while running the project. I was about to start debugging it today, when this whole mess happened.
In MainActivity it says:
Cannot Resolve Symbol 'R'
I imagine that's a bad thing..
EDIT: I got it working, but I still have an issue. See the screenshots below:
Above is what the project tree looks like now.
Above is another project tree from a project which is working correctly. I want both to look like this. (The faulty project used to look like this.)