dankito / RichTextEditor

Rich text WYSIWYG editor for Android and JavaFX
Apache License 2.0
92 stars 36 forks source link

Duplicate value for ressource #74

Open wharnisch opened 1 year ago

wharnisch commented 1 year ago

When using google library 'com.google.android.material:material' in a project also using RichTextEditor library, the following error is thrown when building the project if version number of android.material:material is higher than 1.3.0 (actual stable version is 1.6.1):

Duplicate value for resource 'attr/dividerColor' with config 'DEFAULT' and product ''.

I tried to solve the problem myself in RichTextEditor source, but when importing RichTextEditor in my Android studio there are lots of gradle errors I can not solve.

Please help, I really need help, as I am using this library for my android app 'Rich Text Notes' and I can not update the app any more because of this problem.

Regards from Austria

gulabsagevadiya commented 1 year ago

Have you found any solution to this issue? I am also having the same problem as you.

gulabsagevadiya commented 1 year ago

I have downloaded this lib as a module and removed unnecessary code like the JVM module and combined android and common modules in a single module. trying to solve this issue but didn't get lucky to solve this issue yet still getting this problem

Execution failed for task :app:mergeDebugResources. A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable Resource compilation failed (Failed to compile values resource file C:\Users\Patel\Desktop\android\RichTextLib\app\build\intermediates\incremental\debug\mergeDebugResources\merged.dir\values\values.xml. Cause: java.nio.file.InvalidPathException: Illegal char <:> at index 74: journal.app-mergeDebugResources-31:/values/values.xml). Check logs for more details``

Here is build values.xml file 74 line dasdasdasda

kingYogi911 commented 1 year ago

I think i know the reason behind this error

material library adds an attr as \

and there is a library added in this project name - "net.dankito.utils:android-utils" in this library same attr is defined as \

so this need to be updated

If you think i am right then Please resolve this issue

wharnisch commented 1 year ago

Anyone found a solution to this? I really need a solution, cannot update my app any more. Is there anyone who is able to import projects 'net.dankito.richtexteditor:richtexteditor-android' and 'net.dankito.utils:android-utils' in android studio, so that one can create forks and change attribute's name "dividerColor"?

kingYogi911 commented 1 year ago

I know a temporary sloution for this, just search for 'net.dankito.utils:android-utils' under "external libraries" in android studio, then delete dividerColor in file Res->values->values.xml , the project will compile successfully.

wharnisch commented 1 year ago

Thank you, kingYogi911, I will try this!