When I compile using the command line, the following error occurs,but when I compile in Android Studio, I don't get this error. I know that Android doesn't allow two files with the same name in the same resource directory, even if they have different extensions.
- Android SDK Version: 34
- Gradle Version: 8.7
root@test-2288H-V6:/tmp/workspace/Compile_POC_Android/PQ/PQ# gradle clean build --dependency-verification=off --offline -x test
> Configure project :opencv
OpenCV: 4.7.0-dev /tmp/workspace/Compile_POC_Android/PQ/PQ/opencv/build.gradle
> Task :app:mergeDebugResources FAILED
ERROR: [drawable/baohedu] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/baohedu.png [drawable/baohedu] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/baohedu.jpg: Resource and asset merger: Duplicate resources
ERROR: [drawable/jpg11] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/jpg11.jpg [drawable/jpg11] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/jpg11.png: Resource and asset merger: Duplicate resources
ERROR: [drawable/jpg12] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/jpg12.png [drawable/jpg12] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/jpg12.jpg: Resource and asset merger: Duplicate resources
ERROR: [drawable/liangdu] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/liangdu.jpg [drawable/liangdu] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/liangdu.png: Resource and asset merger: Duplicate resources
ERROR: [drawable/sewen] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/sewen.png [drawable/sewen] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/sewen.jpg: Resource and asset merger: Duplicate resources
ERROR: [drawable/huidu] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/huidu.png [drawable/huidu] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/huidu.jpg: Resource and asset merger: Duplicate resources
ERROR: [drawable/expand] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/expand.jpg [drawable/expand] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/expand.png: Resource and asset merger: Duplicate resources
ERROR: [drawable/ruidu] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/ruidu.png [drawable/ruidu] /tmp/workspace/Compile_POC_Android/PQ/PQ/app/src/main/res/drawable/ruidu.jpg: Resource and asset merger: Duplicate resources
How to solve it without changing the file name?