Android Studio 2.3.2 Gradle Error - android-studio

I am new to Android Studio, and everything was going fine until I received a nonsense error:
"Error:Execution failed for task ':app:processDebugResources'. > Duplicate symbol in table with resource type 'id' and symbol name 'title_conctact'"
I have no idea what it means and I have tried to fix it for two days. I tried uninstalling Android Studio which deleted all my progress, but still, the error remained. Please help, this is annoying. By the way, I am using the latest version 2.3.2.

hi after finding so much on web i don't get any solution so i tried myself to debug it and i got success to fix this issue you need to find the name in files in your case the name is title_conctact so you will get duplicate id's, now you need to rename and make them unique
that's it your problem will be fixed

I had the same issue. The issue I had was due to the keys declared differently in one of my module's resource file and my app's resource file.
In the module's strings.xml file, if you declare the key as 'title.conctact' and in the app's strings.xml file if you declare it as 'title_conctact', then you will face this error.
Changing it to a single format resolved my issue.

Double-clicking SHIFT will open a window. Put the title_conctact inside the search and you will find the .xml file that contains the duplicate id

Related

How can We correct "Invalid file name: 'con' error" in Android studio?

I have spent time googling but without results. I get following error when creating projects with latest android studio:
Invalid file name: 'con'
New Module was only partially completed.
Your project may not compile.
You may want to Undo to get back to the original state
I have also tried previous version of android studio, but without any result.
What could be the cause of this issue and how can I correct it? I am on Windows 10.
Thank you
I Feel silly now because it was because of con word in package name. The accepted answer helped.
A module name is automatically used as directory name.
As you are on Windows the file-system has several file- and folder-names that are disallowed. con is one such disallowed names (case insensitive).
This means no matter what file-system you use as long as you are running Android Studio on Windows you will never ab able to create a file or a folder named con.
Other disallowed file names are:
CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. source
Therefore you have two possibilities: Use a different name for the module or use a different OS.

Merge schemas of custom dialog - Error conflicting definitions

I am following the steps of this page:
https://learn.microsoft.com/en-us/composer/how-to-create-custom-actions
and have reached to the part where it is required to merge the two schemas: bots and your custom one. However when running the powershell script found inside the created project template (CoreAssistant template) I have the following error:
Error conflicting definitions of HelpDialog.dialog :
C:\Users\user\source\repos\AvanadeCoreAssistant\AvanadeCoreAssistant\dialogs\imported\Microsoft.Bot.Components.HelpAndCancel\HelpDialog\HelpDialog.dialog
Microsoft.Bot.Components.HelpAndCancel:
C:\Users\user.nuget\packages\microsoft.bot.components.helpandcancel\1.1.2\exported\HelpDialog\HelpDialog.dialog
Error conflicting definitions of HelpDialog.en-us.lu.dialog :
C:\Users\user\source\repos\AvanadeCoreAssistant\AvanadeCoreAssistant\dialogs\imported\Microsoft.Bot.Components.HelpAndCancel\HelpDialog\recognizers\HelpDialog.en-us.lu.dialog
Microsoft.Bot.Components.HelpAndCancel:
C:\Users\user.nuget\packages\microsoft.bot.components.helpandcancel\1.1.2\exported\HelpDialog\recognizers\HelpDialog.en-us.lu.dialog
Error conflicting definitions of HelpDialog.lu.dialog
HelpDialog is a predefined dialog that was already present. I have installed NodeJs and #botframework-cli package because it was required from the powershell script in order to run bf dialog:merge and now it seems these two sources have some kind of conflict.
To add to other answers, changes that worked for me are as follows:
update-schema.ps1, line 11, change "!**/generated" to "!../generated" and add "!../dialogs/imported"
Also, make sure that your custom action project is INSIDE of your bot directory, it should be a folder next to the "schemas" folder for the script to find it.
Note/Edit: Having the project nested inside the bot works to get the script working, though I do not recommend it due to causing other errors. Oddly, I found it was best to move the whole custom solution up a level, next to the bot project. You may have to edit the [botName].sln file in notepad to reference the location of the project, as well as editing the bot project's project reference.
I fixed it by changing the script. I noticed the script was trying to ignore the folder imported and generated but the error message indicated it was not doing so. So I changed it from !**/generated to !../generated.
I experienced the same issue.
To fix this problem you could simply delete the corresponding dialogs in the "imported" folder. Note that this will, however, delete these dialogs in your bot, which is not optimal but should be of little concern for a sample application.

Is there a way of avoiding this error message? "Couldn't resolve resource #string/todo Tip: Try to refresh the layout."

I'm creating drafts of an app and I keep receiving the aforementioned error on numerous iterations. I feel like I might have mistakenly revalued the relevant string within the JRE / JDK somehow but I'm not 100% sure
I'm new to the game but have followed all recommended actions within Android Studio help prompts. And it keeps creating new strings within res->values->strings
not sure which section of code to include here
I expect this not to be an issue but it keeps reoccuring.
Please try adding a string resource in strings.xml at
<string name="todo">TODO</string>
The file is located at res/values/strings.xml.
Then rebuild the Android project through Ctrl+F9 key combination.

Error: Failed to resolve: com.badlogicgames.gdx:gdx-backend-lwjgl:1.6.5

I used gdx-setup.jar to generate a gradle project and then imported it inside Android Studio. But when I try to compile it, I get this error.
I checked the "desktop" + "Android" option while generating and use Android API 20. When I navigated inside the project, I found that in the DesktopLauncher.java class LwjglApplicationConfiguration appears red. The import statements
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
are both marked with errors. "lwjgl" is red and upon hovering over shows "Couldn't resolve symbol 'lwjgl' in blah blah"
Whats wrong?
This happened to me after updating. However, all I did was click build, then rebuild project, wait for it to rebuild and then for gradle to sync. After that everything should be fine.
Its fixed.
For some strange reason, the gdx-setup.jar file was not downloading lwjgl jar files into the .gradle folder in C:\Users\. Not sure why this was happening, maybe a bug. I went to Advanced settings and checked "IDEA" and then clicked generate. This time it downloaded a whole load of jar files. After it finished, I regenerated again by unchecking "IDEA" so that I would get a Gradle based build.
Finally it works. Maybe there's a bug in gdx-setup.jar

Android 3.0 and higher version issue

Thankyou for taking the time to look at my problem. I'm working on an android application and I keep getting an error in eclipse every time I use the parent="android.Theme.Holo.Light". I have my folder created using values-v11 indicating when to use the correct theme for the correct version but I just get the error:
No resource found that matches the given name 'android.Theme.Holo.Light' in my styles.xml file.
Any idea why this is happening? Thanks in advance.
Try this:
parent="#android:style/Theme.Holo.Light"

Resources