Not sure what to isolate the problem to, but I recently upgraded to app-scripts@0.0.39 with cordova@6.4.0 and ionic@2.1.4. When doing an ionic run android
or ionic build android --release
, the image resources are copying to the wrong folder (/res instead of /platforms/android/res). The verbose output is below:
ls: no such file or directory: D:\Users\User\project\mipmap-*
Updating icons at res
copy resources\android\icon\drawable-hdpi-icon.png res\mipmap-hdpi\icon.png (new file)
copy resources\android\icon\drawable-ldpi-icon.png res\mipmap-ldpi\icon.png (new file)
copy resources\android\icon\drawable-mdpi-icon.png res\mipmap-mdpi\icon.png (new file)
copy resources\android\icon\drawable-xhdpi-icon.png res\mipmap-xhdpi\icon.png (new file)
copy resources\android\icon\drawable-xxhdpi-icon.png res\mipmap-xxhdpi\icon.png (new file)
copy resources\android\icon\drawable-xxxhdpi-icon.png res\mipmap-xxxhdpi\icon.png (new file)
Updating splash screens at res
copy resources\android\splash\drawable-port-hdpi-screen.png res\drawable-port-hdpi\screen.png (new file)
copy resources\android\splash\drawable-port-ldpi-screen.png res\drawable-port-ldpi\screen.png (new file)
copy resources\android\splash\drawable-port-mdpi-screen.png res\drawable-port-mdpi\screen.png (new file)
copy resources\android\splash\drawable-port-xhdpi-screen.png res\drawable-port-xhdpi\screen.png (new file)
copy resources\android\splash\drawable-port-xxhdpi-screen.png res\drawable-port-xxhdpi\screen.png (new file)
copy resources\android\splash\drawable-port-xxxhdpi-screen.png res\drawable-port-xxxhdpi\screen.png (new file)
I don’t think this is an app-scripts problem as it occurs after compilation. Could be the updated Ionic or Cordova cli. The temporary workaround is to manually copy the contents of /res into /platforms/android/res.