grantland / android-autofittextview

A TextView that automatically resizes text to fit perfectly within its bounds.
Apache License 2.0
4.27k stars 689 forks source link

error: duplicate value for resource 'attr/minTextSize' with config ''. #101

Open TonyTangAndroid opened 5 years ago

TonyTangAndroid commented 5 years ago

In case anyone else who also runs into this issue, please refer to this branch which fixed it.

implementation 'com.github.UsherAndroid:android-autofittextview:0.2.9' (This repo is published through jitpack. You might need to add the basic jitpack config.)

The provided error info is limited and it is misleading and you could not think of the reason until you exhaust other possibilities. Hence I am compelled to post this issue here as a reference.

`* What went wrong: Execution failed for task ':app:mergeDebugResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed Output: /Users/ztang/code/klaus_app/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:1445: error: duplicate value for resource 'attr/minTextSize' with config ''. /Users/ztang/code/klaus_app/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:1445: error: resource previously defined here.

Command: /Users/ztang/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/d6b5ff7ee9ed628776431a2b74447e82/aapt2-3.2.1-4818971-osx/aapt2 compile --legacy \ -o \ /Users/ztang/code/klaus_app/app/build/intermediates/res/merged/debug \ /Users/ztang/code/klaus_app/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0 Output: /Users/ztang/.gradle/caches/transforms-1/files-1.1/autofittextview-0.2.1.aar/c5feda23a4f26c622aee0582e2cd1d02/res/values/values.xml:3:5-192: AAPT: error: duplicate value for resource 'attr/minTextSize' with config ''.

/Users/ztang/.gradle/caches/transforms-1/files-1.1/autofittextview-0.2.1.aar/c5feda23a4f26c622aee0582e2cd1d02/res/values/values.xml:3:5-192: AAPT: error: resource previously defined here.

Command: /Users/ztang/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/d6b5ff7ee9ed628776431a2b74447e82/aapt2-3.2.1-4818971-osx/aapt2 compile --legacy \ -o \ /Users/ztang/code/klaus_app/app/build/intermediates/res/merged/debug \ /Users/ztang/code/klaus_app/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0

thiago-you commented 3 months ago

Hi @TonyTangAndroid , how you guys doing?

I ported this library with updated dependencies and configurations, also moved out from JCenter do use Jitpack.io:

https://github.com/thiago-you/autofittextview

Check it out!