-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android: Error occurred while copying #137
Comments
I have been having exactly the same issue on v0.15.1. This was not an issue on v0.14.0, so I downgraded to that version. EDIT: I just tried it out and v0.14.0 seems to have its issues as well. The icons don't fit the app circle. I would suggest generating those manually in Android Studio |
@johnbwoodruff These are just warnings. It's because the copy process expecting generated Adaptive Icon foregrounds, but since you're not using Adaptive Icons, they aren't there. It's fine to ignore, and this won't be an issue by 1.0.0 (see #113). @benjiJanssens I'm not sure what you mean by app circle, but it sounds like a separate issue. Could you create a new issue if the problem persists in the latest version? |
This issue is still there. |
I agree, this is still an issue. This a true problem because the launch app of the icon remains capacitor's picture, in my case. |
I have the same issue |
same issue here |
the issue still exists... |
I also encountered the same issue |
the issue still exists... |
After displaying the warning, the icon of the application is still the logo of the capacitor. |
any body got how resolve this? I could not make the foreground image. But android studio has an easy option https://developer.android.com/studio/write/image-asset-studio?hl=es-419 |
How can I remove the standard ionic app icon then? Because the ic_launcher_foreground.png will be generated with the ionic icon instead of my own app icon.. |
I think this should be re-opened. I created a blank starter, added the android and ios platforms, and then did cordova-res with a new icon, which generated the warnings. Project is here: https://github.com/kensodemann/delete-me You can verify here, for example: https://github.com/kensodemann/delete-me/tree/master/android/app/src/main/res/mipmap-xxhdpi
Seems to be related to this fix: 65520bc which is copying files that have not been generated even though I have tried generating with and without |
if you generate the ic_launcher_foreground.png with android studio it will overwrite this icon. You dont need to delete or if you want delete manaually. but is unnsecasary |
Same issue, with a blank ionic/capacitor app.. Run this: And also got bunch of warnings and icons didn't get replaced: Generated 18 resources for Android |
@gregmeszaros - follow the instructions here to generate the *-foreground.png files: https://github.com/ionic-team/cordova-res#adaptive-icons That should at least get you past this, though I believe that we need to get a bit more sorted out in how we handle this, document it, etc. as it is currently not exactly obvious what to do. Note: you could also generate the adaptive icons via other means if you don't want to follow the linked instructions. |
Use the following steps to generate. However, you need to create a file as mentioned. resources/android/icon-foreground.png must be at least 432×432px Regular Android icons will still be generated as a fallback for Android devices that do not support adaptive icons. 📝 Note: For Cordova apps, Cordova 9+ and cordova-android 8+ is required. |
This is not clear to me. Can you tell me the steps to avoid this issue? |
Did you create the mentioned files and placed under the named folders? You need to create resources folder if not created |
@stNamring Can you tell me how to create those 2 files? I have a resources folder and it has |
@Sampath-Lokuge I have used my same icon file and created icon-foreground.png with the mentioned size. Also, created icon-background.png with the same size with background color of my icon. |
@stNamring Can you tell me the other steps also after creating those 2 files? |
@Sampath-Lokuge then, you fire that command to generate resources. |
you can do it from android studio, just follow this steps from the developers page: https://developer.android.com/studio/write/image-asset-studio I've made a short video on how to change the icon |
I've created an icon with the name according to the documentation and in the resources/android/icon folder and then run the command cordova-res android --skip-config --copy and that doesn't solve the problem. @stNamring You just copy from the documentation and it doesn't work |
Guys, I believe it is a mistake when generating the images using Go to: resources \ android \ icon Copy the files: Paste in the same folder: resources \ android \ icon. ( Dont rewrite ) Rename the copied files to: I ran the command As I said, it is a temporary resolution, I believe that the way in which images are generated today by |
You may need script to copy if it does not copy to resource folder. |
On the plugin page i.e Cordova-res repo , You need to look at this particular section. The adaptive icons are required for Android Platform and you need to put these image at |
Update, fix? |
@Hembi You need to do it manually. See: https://youtu.be/QOsDG5RSQ-Q |
Thank you, I found this solution, but fix the command would be a better solution. |
Hello! Just in casy anywone is still struggling to find a solution this worked for me: Step 1Create a 432x432 black .png file. I used photopea.com. Then save it as "icon-background.png". Please note that I created a black image since I need a black background for my icon and I went for the minimum 432x432 since its only black I dont need it to scale well to other resolutions. Step 2Create a 1024x1024 .png file and save it as "icon-foreground.png". In this case if you want the actual background you provided in the previous step to show your icon should have transparency. In my case I just provided an exact copy of my icon since I dont mind it being placed on top of my black background . Step 3Now you can run |
I have migrated to Capacitor 3.0 beta 1 and this problem still happens. |
You need script to copy the generated resources to the designated Android and iOS folder. Refer: https://medium.com/@dalezak/generate-app-icon-and-splash-screen-images-for-ionic-framework-using-capacitor-e1f8c6ef0fd4 |
@stNamring worked but this is an alternative to get past the issue but the issue persists on cordova-res |
I have the same problem for andorid platform |
Thanks @RockyLon . Your solution worked perfectly. I hope that ionic can fix this issue. |
@RockyLon thanks! |
For clarity, the files needed for this to work should be organized like this:
I kept getting these copying errors even after adding the Perhaps the README could be updated to show this tree explicitly in the https://github.com/ionic-team/cordova-res#adaptive-icons section instead of displaying it without the adaptive images and only then mentioning them further down? Clearly the current docs are causing a lot of confusion. |
thanks it is now working! |
Thank you @ErickRuano ! |
Change your application icon manually |
If a folder 'android' does not exist within a resources, it must be created |
Will review for 1.0 milestone |
ERROR: Missing valid source image for Android icons (sources: resources/android/icon.png, resources/android/icon.jpg, resources/android/icon.jpeg, resources/icon.png, resources/icon.jpg, resources/icon.jpeg) encounter an error |
I was missing |
It says the mentioned files are not present in the desired location. Check the file names and the folder/directory again. The correct size for icon and splashscreen can be found in the ionicframework official website. |
Closing as Cordova support was dropped in |
ok i checked some here |
I am building an Ionic app with capacitor, and am trying to generate the resources as specified in the docs. It works great for iOS and I get all the icons correctly generated. When I run it for android, I get this error. Then when I run my app after a rebuild and sync it only copied the splash screen correctly. The app icon everywhere else is still the default capacitor icon.
This is the error I'm getting:
In my
resources
directory I don't have files with these names. Instead they're named:Which makes sense why they're not getting copied. Is there possibly something I'm doing wrong? My icon is following the directions. It's in the resources folder called
icon.png
, and it's 1024x1024. I get no errors with iOS, so I don't think it's something I'm doing wrong, but I'm absolutely not ruling that out.The text was updated successfully, but these errors were encountered: