Duplicate value fo resource 'attr/tint' - android

I do not know how this error started to happen, I simply closed the android studio yesterday and I turned off the pc, today, I turned on the pc and opened the android studio, then this error appeared soon after opening the android studio.
What have I tried?
invalidate cache
rename and delete files that look like duplicates.
delete .gradle and clear / rebuild project
C:\Users\joaoa.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.1.aar\70b6446a0ad42e67664086d0c5dca4d5\res\values\values.xml
C:\Users\joaoa\Desktop\MyPast\myProjects\project001\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
Error:java.util.concurrent.ExecutionException:
com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for
details
Error:Execution failed for task ':app:mergeDebugResources'.
Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for
details

Please open show log in files and delete all the files where you located and please restart your android studio.
if not solved then Again restart with option like InvalidDate Cache and Restart.
Hope this helps you.

check dependencies in gradle file.
2 or more libraries use in project conflict resource file.
example:
in library A,B in variables in arrts.xml or color.xml

I don't think this is a gradle version issue... I am using Android Studio 3.0 with Gradle Plugin Version 3.0.1 (which uses Gradle 4.1) THE LATEST. And I am getting this same issue. Just rename whatever attribute you've named tint to something like libTint or lib_tint or even more obscure ili_lib_tint so the issue can be resolved. I really want to use this lib and not look else where, please.
This is the xml element causing the issue
ImageLetterIcon/imageletter/src/main/res/values/attrs.xml
<declare-styleable name="TintableImageView">

Android studio creates many files that are not part of the normal source code. If you reboot without saving your project things may get whacked out but this could happen for no apparent reason. You have already cleaned your project so it regenerates some of these files. The .metadata file in the root of your workspace can be deleted but you will need to import all projects already in the workspace. I suggest you check the directory structure of your project using something other than android studio and even delete any generated folders as they will rebuild on the next compile. Perhaps even use a new workspace and copy source code over. First thing you should do is backup everything you want to keep as these suggestions could cause disaster if you are not careful. Consider version control, git repositories or github to save your project in the future as you can roll back to a previous state in the future

The solution works for me is to create a new values-v21 folder and put attr.xml in that, by this it would avoid merging your resources and by doing this your attr will work only from sdk 21 and above.

Related

mergeExtDexDebug failing with type defined multiple times error

I have been experiencing this error for a couple of hours now. I was converting java code to kotlin and stumbled upon this.
Type {module}$someclass$1 is defined multiple types:
...\app\build\intermediates\external_libs_dex_archive\debug\out\{file}.jar:classes.dex,
...\app\build\intermediates\external_libs_dex_archive\debug\out\{file}_0.jar:classes.dex
Even removing the dependency doesn't fix it. It just shows up for another module.
Note: I have multidex enabled. Clean project, rebuild project or invalidate restart did not fix it.
Turns out downgrading gradle fixed the problem. I was using 3.6.3 and going back to 3.6.2 worked.
\app\build\intermediates\external_libs_dex_archive\debug*out*{file}.jar:classes.dex
Just delete the directory or folder I have marked in the above path with bold letters(out).
Then run the project this error does not come. In my case it solve my problem.
Which folder contains the duplicates just delete the folder. when we run the project it will generate the dependencies in that location. no files were there so the error not occured

Clean project error with databinding: Unable to delete file androidx.databinding.library.baseAdapters--setter_store.json

I use Databinding. Sometimes while I make changes project may be broken. Then I go to Build -> Clean project & Re-Build project. And I get some strange error:
Unable to delete file: {path_to_project}\app\build\intermediates\data_binding_dependency_artifacts\debug\dataBindingMergeDependencyArtifactsDebug\out\androidx.databinding.library.baseAdapters--setter_store.json
Every time I don't know how to fix it, because I get this error on clean or rebuild. Even if I make Invalidate caches / Restart the problem isn't gone.
If I try to delete this file manually I get error that file is using by another process. Then I close project and successfully delete this file. But when I open the project and build it I get the same error described above.
As I can see the problem is about databinding, but I'm not sure because I saw the same problem with other files from other users on StackOverflow. Sometimes problem is gone by itself, but usually it isn't. Maybe the problem occurs because of errors in layout files, but how to find it out if there is no errors in build log.
Has anyone meet that error? Any ideas how to fix that situation without crush whole the project in undefined time range?
I close Android Studio, delete the app\build folder then reopen Android Studio. Note that all instances of AS must be closed for Windows to let you delete the build folder.
Put Below command in Android Studio terminal.
gradlew --stop
So, the problem is still here but all answers don't solve it. Project doesn't compile for a reason, usually it's some kind of mistake, and if you just delete build folder (which contains file Android Studio is unable to delete) it will not solve problem.
When you are trying to compile project you may get a dozens of errors in generated files (databinding, room, etc). Unfortunatelly, errors are not displaying in the usual window, but if you expand this generated files with errors, you probably will see the real problem, your mistakes you didn't fix when was changing your classes related to generated files. Just fix these mistakes and compile project again. Note: you probably should to look at warnings too.
But if you already got error Unable to delete file you won't see errors in generated files. You need to restart Android studio (if it won't help, you need to delete app\build) and try to compile your project. After that you will find generated files with errors in build tab.
Hope it helps!
First follow this 4 steps
Remove your file generated (build folder)
Clean your project ( simply run cmd command - > gradlew clean)
Invalidate cache and restart Android Studio
Restart computer
If not helpful please try following steps
Gradle sync;
Reinstall Java JRE & Java SDK;
Reinstall the latest version of Android Studio
Rolling back to the previous AS version
Invalidate cache and restart Android Studio
Delete the gradle and .gradle directories in the project directory;
Delete the .gradle directory in your directory;
Run gradlew clean ( simply run cmd command - > gradlew clean)
I have the same problem, and tried the method mentioned above. I could not find the related class in the error message when I searched in the project directory.
In the end, I suspected that it maybe ~/.gradle problem, and then recompile after deleting, and finally solved.
mv ~/.gradle ~/.gradle_bak
Try to disable the daemon and parallel build in gradle.properties
org.gradle.daemon=false
org.gradle.parallel=false
I tried most of the solutions above but seemed not to find them working.
But here is what I did to get my project up and running again.
I am assuming this is happening because you are using dataBinding.
browse to the dataBinding section in your app gradle file
now disable dataBinding by setting to false.
next, rebuild your project and you will notice an error about something to deal with missing a dataBinding in xml file.
Next enalble dataBinding by setting to true this time.
next, rebuild your project.
It should have cleared that strange error.
Forgive me for the strange explanation but am new to contributing to stackoverflow.
It is because of databinding cache issue. We need to delete that cache by disabling it first. I solved the issue after changing the properties of the gradle.properties file:
org.gradle.daemon=false
org.gradle.parallel=false
android.enableBuildCache=false
org.gradle.caching= false
android.databinding.enableV2=false
and
dataBinding {
enabled = false
}
Clean and rebuild the project. After rebuilding it will show errors. Then change all the configuration (make all properties true) and clean, rebuild. It will work absolutely fine.

Cannot Resolve Symbol R -existing solutions aren't working [duplicate]

Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
In every instance in all of my classes where I reference R.id.something, the R is in red and it says "cannot resolve symbol R". Also every time there is R.layout.something it is underlined in red and says "cannot resolve method setContentView(?)". The project always builds fine. It is annoying to see this all the time. I have read many other questions on here about something similar but most involved importing projects from Eclipse. I am using what I believe to be the most recent version of Android Studio and the project was created with Android Studio and worked without any "cannot resolve R" problems. I would like to know what causes this if anyone knows.
I had this this issue too. A simple 'gradlew clean' and 'gradlew build' did the trick.
Click on Build->Clean Project and that will perform a gradle clean
In the latest versions of Android Studio, at least for me, the following works:
"Tools" -> "Android" -> "Sync Project with Gradle Files"
In latest Android Studio 3.1.3 (July 2018), "Sync Project with Gradle Files" is available in main menu bar.
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'
Problem resolved after changing the gradle version. Details history can be found here.
I have a similar problem and here is what I did:
Clean Project and Sync Project with Gradle ,
check buildTools version in my sdk
From build gradle (module ) change minSdkVersion from 8 to 9
defaultConfig {
applicationId "PackageName"
minSdkVersion 9
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
But all this didn't help.
Finally I found the answer (this worked in my case)
Change from build.gradle(module:app)
android {
compileSdkVersion 21
buildToolsVersion '21.0.1'
......
....
}
Or
Select File | Project Structure change Build Tools Version to 21.1.1
Check your xml files.
Clean Project.
This is it.
For example I had an entry in my strings.xml:
<string name="A">Some text</string>
And in activity_main.xml I used this string entry
<TextView
android:id="#+id/textViewA"
android:text="#string/A"/>
While'd been working with project, I deleted that
<string name="A">Some text</string>
And consequently activity_main.xml became not valid. As the result: cannot resolve R.
So, check your *.xml files and clean project.
If you see this error after moving java files or directories to other locations, then you can guarantee that Android Studio has gotten confused. And guess what? undo-ing those actions doesn't fix the problem.
So you try a clean, but that doesn't work.
And restarting doesn't work either.
But try File -> Invalidate Caches / Restart... -> Invalidate and Restart
Android Studio maintains information about which files are dependent on which other files. And since moving files around is not implemented correctly, moving files causes errors. And that's not all: caches of these dependencies are used in an attempt to speed up the build.
This means you not only have to restart, but you need to invalidate those caches to restore (or more accurately, rebuild) sanity.
I think if you put your Activities files to another folder than the default one. You need to import the com.example.yourproject.R (this is your project R file NOT Android.R file) to ALL activities using R. For example, in MainActivity file insert this line:
import com.example.yourproject.R;
There seems to be many causes for this issue. Recently, I added an activity to test with called NewActivity. This created a file called res/menu/new.xml and gradle did not like that name because new is a reserved word.
gradlew clean
or
"Tools" -> "Android" -> "Sync Project with Gradle Files"
Those are definitely good things to try, but you may have some other issues you need to resolve before you run those commands.
You should do two things, first clean the project (in build menu) - it deletes the build directory which may be the culprit:
Next, Sync project with Gradle files (under file):
This is the placement for the items in Android Studio 3.6.1 on Windows 10.
If all else fails, Invalidate Caches and Restart (under file) usually does the trick. This closes down the whole program and takes the most amount of time, in my opinion.
To clarify, I am running this on windows 10, but it should work on MacOS and Linux as well.
R.java file contains the link between xml and java page. "R cannot be resolved" arise only if there is a problem with some of your resource files. So the best and effective way is delete the last done xml or drawable in res file. and then again start from there according to android coding norms. This is the only way. The effective and right way.
Also use Git for proper tracking of code. ..
Your code is just scrambled. The answer is fairly simple.
Just go to Build --> Clean Project.
That should do the trick.
Check also your version of Android Studio.
I'm currently using Android Studio 3.0.1.
Have you updated your SDK tools recently? Launch the android SDK manager and make sure you have the latest SDK tools, which is now separate from the platform tools. I had this same issue when I first updated my SDK manager, the SDK build tools package did not show up for install/update until I closed and reopened the SDK manager.
I had to import my R package in android studio. For ex: import com.example.<package name>.R
Just clean your project and Sync Project with Gradle File.
And the problem will be resolved.
I recently had this issue and the clean/build etc. didn't resolve it. I guessed I had an issue somewhere but wasn't sure where to look to find it (was it in the manifest, resource xml files etc?).
When something is wrong, you can find out what it is by doing a code analysis run.
From the menu at the top choose:
Analyze -> Inspect code, scan the whole project using the 'Default' profile.
Your inspection results will contain an element called 'Android'. In here you will get a list of anything that is causing issues in your resources and manifest file. The errors will open up the generated xml files from your build which will show any errors in red.
My exact issue was caused because I was using flavour based manifest files and I copied some permissions inside the <application> tag in the flavour by accident.
UPDATE: I did have an issue after where Android Studio still showed the error after the fix, even though I could now build and run perfectly fine while the error was still there. (I am running a canary build so putting it down to that for now)
I have had this with
An uppercase letter in my drawable resources.
Import Android.R being added by Android Studio (or Eclipse)
Error in xml file
I faced this issue when I manually renamed the domain folder of my app. To fix this issue, I had to
Set the proper package folder structure of <manifest> in AndroidManifest.xml.
Set the new package location for android:name of <activity> in AndroidManifest.xml.
Clear cache by
File Menu -> Invalidate Caches / Restart ...
The issue will be gone, once the Android studio restarts and builds the fresh index.
I had the same issue:
Android Studio 3.2
The project compiles and runs fine, but I am getting "Cannot resolve symbol "R" on-screen warnings
Does not help:
Build->Clean Project
Build->Rebuild Project
File->Invalidate Caches/Restart
Helps:
either
in build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
...
}
replace with
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
...
}
or
Update Android Studio to 3.3
This is a very old question, but it still happens a lot and there is no truly comprehensive answer here.
I have had this problem more times than I want to admit. It can be caused by a wide variety of issues that mostly all have to do with your project structure not matching what's expected. Here's a list of all the problems I've had:
Importing from Eclipse to Android Studio does not always work smoothly, especially with older versions of Android Studio. Make sure you're using the correct directory tree. It should look like this for a moderately mature app:
AppName/ // AppName is your app's name, obviously
.gradle/ // This is a compiler created directory. You should normally leave it alone
.idea/ // Ditto
build/ // This too
gradle/ // And this
app/
build/
libs/
src/
androidTest/ // Tests based on the Android instrumentation runner should go here
main/
java/
fully/ // Typically com
qualified/ // the domain name. Longer package
// names may have deeper folder trees
AppName/ // All your java files go here
res/
drawable-*/ // One of these for each resolution you support
layout/ // All of your general layouts
menu/ // All of your menu layouts
values/ // All of your resource xml files
xml/ // PreferenceScreen layouts go here
AndroidManifest.xml
debug/
test/ // Pure jUnit tests should go here
.gitignore
app.iml
build.gradle // This is the gradle file you should be making most changes to
proguard-rules.pro
.gitignore
build.gradle // This gradle file should mostly be left alone
gradle.properties
gradlew
local.properties
AppName.iml
settings.gradle
It may not look like this in your IDE. There is a drop-down above the file tree that displays your files in different ways, and it defaults on my system to one called Android that breaks your files out into their different types. It's easier to fix this kind of problem from the one called Project, and even easier directly from your OS's file system, because Android Studio collapses folders that only contain another folder onto a single line.
Especially if you ever change the name of your app, you need to make sure that the source tree main/java/com/domain/AppName is updated. Also make sure that the package tag in your AndroidManifest.xml is correct.
If there are errors in either your Gradle files or your AndroidManifest.xml, this will prevent Android Studio from properly building your resource files. Gradle files can be broken by upgrading Android Studio sometimes, especially from the pre-1.0 versions. Sometimes this is because it stops supporting older versions of the Gradle plugin, so you need to update your version numbers. It can sometimes be hard to find what the current versions are. As of today, 7/17/15, my apps are compiling fine with com.android.tools.build:gradle:1.2.3. This is in the dependencies block in the outermost gradle file,
If your AndroidManifest references a non-existent drawable or string resource or activity, it will break and cause this error. Sometimes if anything references a nonexistent drawable or string resource you will get this error.
If you have a file in your resources that is corrupted, or an invalid xml file, you will get this error.
In my experience, sometimes Android Studio just hiccups for no reason, and you need to restart it and/or your PC. I don't know why, but sometimes it works.
If you have two xml resources with the same name, in directories that do not override each other, you can have this problem. For instance, you can have the same name in drawable-mhdpi and drawable-xhdpi because they override each other depending on the target device, but if you have the same name in layout and in menu, it will cause a problem. Rename or delete one of the files.
If only some resources are having this problem, those resources are most likely in the wrong directory.
In one case I had to completely reinstall Android Studio. I don't know what was wrong, but it worked.
In one case I moved my entire project to a different directory and re-imported it as a new project. I don't know what was wrong, but it worked.
Xml files with reserved words for names can cause this problem. Rename or delete them.
There are a few ways your Gradle file can end up referencing a version of the build-tools that you do not have installed. Correct this by changing Gradle or downloading the appropriate build-tools.
Finally, after you've fixed whatever is wrong, you need to clean your Gradle project. You do this by going to the Build menu at the top and selecting Clean Project.
Just go to Android Top menu list. click on Build Menu, in under Build click on Rebuild Project.
I have a special case for this problem.
In my project, every thing goes well, it can compile and build successfully, but in my Android Studio IDE(and I also tried Intelligent IDEA, they are in the same situation) the R.java file can not be resolved well and always be drop in red line.
Just like this:
This almost made me crazy, I can't bear the read color when I am programing.
At last I found this tricky problem is cause by my R.java's file size.
My project is very a huge one, it supports many multi-languages and multi screen sizes. There are so many resources that my R.java's file size is about 2.5M.
The max size of a file in Android Studio is 2.5M in default settings, so files bigger than this limit can't not be resolved well. And you can change the default settings in "AndroidStudio-root/bin/idea.properties".
change this line:
idea.max.intellisense.filesize=2500
to :
idea.max.intellisense.filesize=5000
Then restart Android studio, the red color dismissed, I can program happily again.
Build > Clean Project
This worked for me. Had the same problem a few times, and this seems to set it right. Unless you have changed something or called a variable R. This issue usually happens out of nowhere, when it happens to me, so I imagine its just Android studios freaking out. haha
Have a good one, and good luck with your projects.
Do: Build > Clean Project
IMPORTANT: Make sure you don't have any Errors after Clean Project in Message Pane (Alt+0). If you find any red circles with exclamation mark, than you must remove those errors in your code.
Mostly these errors are related to #string/ or #array/. Clean Project again and done!
I had the same problem and most times it is resolved by
Sync project with gradle files
Doing Build -> Clean Project
Doing File -> Invalidate Caches
But this time the error persisted even after doing all these things and at last i found the culprit.
The problem was in an xml file, where i have given ordinary string value for an android:id instead of an id resource type.
MISTAKE
android:id="username"
CORRECTION
android:id="#id/username"
Messing up things related to resources in xml files is a major
reason for this error.Beware of the fact that it may not be shown as an error in the xml layout file.
NOTE
In most cases the compiler shows you the source of error in the Message.
Try to check it first before attempting other solutions
I had the same problem, and it happens when I create a new project.
What I do is:
check for SDK updates
then android studio updates,
then reopen the project
open the andoridmanifest.xml
erase a space between a "_>" in the android:label and save.
That works for me.
I had a hard time fixing this myself.
Make sure you have no errors in your layout.xml files.
Go to Build > Clean project
It worked for me, hope it works for you too.
`I had same problem and it solved by :
1) Sync Project with gradle files
2) Build -> Clean Project
3) Build -> Rebuild Project
4) File -> Invalidate caches
//imp step
5) Check your xml files properly.`
This notation seems to work fine.
android:id="#+id/viewID"
Android Studio's design panel doesn't seem to work well.
Same problem. Started when I added a few images in my drawable folder and tried to access them. Also the images added were having the extension with capital letters. That seems to have crashed the build, since even if I renamed them, the message was the same and R was inaccessible. What I did is, in the .iml file I looked for the excludeFolder and removed them (like bellow):
<excludeFolder url="file://$MODULE_DIR$/build/apk" />
<excludeFolder url="file://$MODULE_DIR$/build/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
<excludeFolder url="file://$MODULE_DIR$/build/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/res" />
<excludeFolder url="file://$MODULE_DIR$/build/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
After that I rebuilt the project and R magically re-appeared.
There are many causes for this error.
Sometimes it occurs for replacing an image file keeping same name.
Suppose you deleted an item from your layout .xml say a <Button/> but it is still declared in any Activity or Fragment .java.
Many more.
Best way to track the error is Rebuild it rather clean or sync doing some intentional error.
If it doesn't solve your problem then there must have to be some flaw or runtime error or error occurred due to improper use of resources in may be both java or xml file in your code or design which is forcing gradle to stop because (R)esource file can't index your resources properly and you have to admit that.
If your project ran before you made the changes then comment out the changes you have made and try to rebuild the project.
It will surely work since there will be no changes.
To track down the exact error, check the changes by breaking the changes into smaller module.
For example - If you are making a list visible with a button click and inserting list values in the adapter, first check if you are able to make it visible or not then check for adapter errors.

Random fail to build due to a 10.jar file not being deleted

Error:
Error:java.lang.RuntimeException:
com.android.build.api.transform.TransformException:
java.io.IOException: Could not delete path 'C:\Users\Roudy
Kanaan\Documents\synkers-android\app\build\intermediates\transforms\desugar\development\debug\10.jar'.
A fix would be to clean the project or manually killing the "Java platform SE binary" process that's actually using that file. I don't want to clean project/manually delete file every other build and I can't find a permanent fix for this problem.
What I tried:
Invalidate cache/restart: temporarily fixes the problem
Clean build: temporarily fixes the problem
Deleting the file manually: temporarily fixes the problem
This issue, if I remember correctly (Not so sure), started to happen when I updated android studio to some version (3.0 maybe) I'm not exactly sure but just trying to back trace this problem.
people have faced random issues after upgrading to 3.0. Mine was that i was extending with Application instead of MultiDexApplication. I would suggest you to make a new sample application via studio 3.0 and compare the changes in the Gradle scripts files.
Also, you should :
use implementation instead of compile.
update the build tools.
for once, manually remove build, .gradle, .idea folder and file and the build folder from the app folder.
upgrade your gradle.
Try these things, It will eventually get things sorted. Let me know what resolved it, even if nothing from the above.

'Cannot resolve symbol' and 'No resource found that matches the given name' - not a duplicate

I opened my project in Android Studio yesterday and got red everywhere with 'Cannot resolve symbol' as the description. It was completely random as no changes had been made to either the project or AS since the last time I opened the project. I ended up updating Android Studio to 2.0 and trying a bunch of solutions I found online but nothing works.
Like this guy, I have already tried:
Rebuilding the project
Cleaning the project
Syncing with Gradle Files
Closing the Project, closing AS and relaunching / reopening
File > Invalidate Caches / Restart
Examining Lint, didn't see anything obvious
Double checking all support libraries are up to date in the SDK manager
Examining my Build.gradle, although no changes and it's the same as usual, the way it was working all the time.
I have also tried the following steps (from the accepted answer):
Exiting Android Studio
Backing up ymyour project
Deleting all the .iml files and the .idea folder
Relaunching Android Studio and reimporting project
I also tried:
Removing the 'proguard' entry in build.gradle
Changing to "Use default gradle wrapper" in preferences
Another solution is to move 'buildTypes' in build.gradle but 'buildTypes' is already at the bottom of the Android section
Don't mark this as a duplicate if the "duplicate" is someone who fixed the same problem by doing something that didn't fix my problem.
Here are some screenshots:
As you can see, the color 'white' does exist:
R errors everywhere as well:
These errors are everywhere too:
Why are there two res directories and why is the one with the necessary resources a sub-directory of the java directory? Could this be related? Screenshot here:
EDIT: I created a drawable directory in the main res directory and added one of the drawables that won't get picked up by build variants. It removed the relevant 'Cannot resolve symbol' error. But when I deleted the main res and tried try to move the whole res directory in the java subdirectory to the main directory I got the following error:
EDIT: I managed to build without errors by deleting the outer res directory, copying the one inside the java one, pasting that into the main directory then deleting the one inside the java directory. How these got moved around like that I do not know. Probably caused by following the 'solution' of deleting and importing the project again. Whether it actually runs properly on a device I do not know as Android Studio is hanging for the last 20-30 minutes (as it does sometimes). If it does I may answer my own question with what I did to finally fix the problem.
The error shows you that you do not have value white in color constants.
Please check all your resource files (colors.xml, strings.xml and so on) - do you have line
<color name="white">#FFFFFF</color> in one of them?
Try creating a new project entirely, and copy and paste everything. XML files, classes, etc. That should solve your problem.
Eventually solved it by moving (by copying, pasting and deleting since AS wouldn't let me move it) a res directory that had been misplaced from deleting and re-importing the project to try and fix it initially. I don't know which one of the solutions worked but one of them must have. I just had to fix my project again after the re-importing 'solution' broke it. The res directory was a sub-directory of java when it should have been one level up as a sub-directory of main.

Categories

Resources