Error:Execution failed for task ':app:mergeDebugResources'.
C:\Users\user\AndroidStudioProjects\BrainTrain\app\src\main\res\mipmap-hdpi\USER-PC.eml: Error: The file name must end with .xml or .png
This error as been occurring ever after closing my Android studio
You put a file, named USER-PC.eml in res/mipmap-hdpi/. That is not a valid filename for that directory (wrong extension, dashes not allowed), and quite possibly it is not a valid file for that directory.
So, remove it from the project for now.
Related
I want to build aab to upload CH Play but it always fails and shows a message:
Execution failed for task ':app:packageReleaseBundle'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> File 'root/res/drawable-hdpi/ic_launcher.png' uses reserved file or directory name 'res'.
I tried to search ic_launcher.png but my app does not use that name.
Note: I added 'ic_launcher.png' in the folder drawable but it still errors.
Please help me with this issue. Thanks in advance!
'res' is android application reserved directory name, try to change 'root/res' for another name
I suspect you depend on a jar which should be an aar.
Jars don't have the concept of Android resources, so when the app bundle is built, it would consider the "res" directory as a a regular directory that would thus be packaged under "root".
Resources can be packaged in aar files, which would then be packaged properly.
i tried to create an app widget.. i can run the widget in emulator.. but i cann't build it as apk file
Below is the error
Android resource linking failed
Output:
F:\me\Workspace\example\base\build\intermediates\merged_manifests\
debugFeature\processDebugFeatureManifest\merged\AndroidManifest.xml:102:
error: resource xml/ptcwidget_info (aka com.example.app:xml/widget_info)
not found.
error: failed processing manifest.
but this widget_info.xml is under UIModule.. this merged manifest file is not finding xml folder under resources
Check gradle implementations, if you did add library it can be merge. Or try rename the xml file and sync project with gradle file.Files may be overlapped
Error:Execution failed for task ':app:mergeDebugResources'.
Error: com.android.builder.internal.aapt.AaptException: Failed to crunch file C:\Users\SONY\Desktop\Project tango\zip folder Project Tango\tango-examples-java-master\Solution\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.4.0\res\drawable-xhdpi-v4\abc_textfield_search_default_mtrl_alpha.9.png into C:\Users\SONY\Desktop\Project tango\zip folder Project Tango\tango-examples-java-master\Solution\app\build\intermediates\res\merged\debug\drawable-xhdpi-v4\abc_textfield_search_default_mtrl_alpha.9.png
file crunching fails due to improper image or media files make sure all your image name are in small letters without space or special characters except '_'.
also proper format of image is selected e.g if u rename a jpg image to png without converting it wont work.remove the image which u inserted rebuild your project i hope it works for you
Building the project throws the following
error:
Error:com.android.builder.internal.aapt.AaptException:
Failed to crunch file ....\common_google_signin_btn_text_dark_pressed.9.png into ....\common_google_signin_btn_text_dark_pressed.9.png
Error: File path too long on windows, keep below 240 characters
Just try to use shorter path for your project. In my case i have just moved my project folder to desktop and after opening project from desktop this problem will disappear automatically.
I'm using Gradle 1.5.0 with Android Studio. Project syncs with Gradle without any issues, but when I run the app, I get the follow error message
Error:Execution failed for task ':App:mergeDebugResources'.
/Users/Zee/Repos/App/res/drawable/notification.mp3: Error: The filename must end with .xml or .png
Using an mp3 file, so not sure what to do at this point. Any help is much appreciated.
You can't put mp3 file in drawable. Drawable folder is for images. Put your mp3 file or any other format in raw folder.
Raw folder can be found in res/raw
If it doesn't exist then just create a raw folder in res folder.
Possible cause
Another scenario causing the error might be, that you must have mistakenly pasted your whole drawable-xxxhdpi/xxhdpi/xhdpi/hdpi/mdpi folder in your drawable folder which may have resulted in cascading of drawable folder and thus giving this error.
Solution
Just go to that folder & delete the unwanted/extra folders.Then the issue will get solved.
I
I had .zip file containing grandle files, in `res/drawable" folder. Then I deleted it from the "drawable"
directory. It worked for me...
Error:Execution failed for task ':App:mergeDebugResources'.
/Users/Zee/Repos/App/res/drawable/notification.mp3: Error: The filename must end with .xml or .png
this error occurrs when we attempt to delete all files except .xml and .png from all folders in our package.
e.g. If the assets folder has the files debug.exe and java.exe, and we want to delete them