Android Studio. Image Assets sizes generation - android

I successfully generated a "Launcher Icon" for my project with all expected sizes, now I want to do the same with images to use in ImageViews. I tried all the options in "Image Assets" and none worked.
How can I generate all the different image sizes with Android Studio at once? Just like the launcher icon.
Thanks.

If you use AndroidStudio this plugin is perfect
https://plugins.jetbrains.com/plugin/7658?pr=

Related

Flutter Android launcher icon looks very small

I'm using the flutter_launcher_icons package to generate launcher icons for both Android and iOS. Everything looks great on iOS, but on Android the icon looks very tiny:
It's the second one from the left. I've tried all kinds of things to get it to be bigger. I've tried several different source images to generate the icon, 512x512 and 900x900, but no matter what I do I can't get it to generate an icon as large as the others. I'm sure I'm missing something stupid here. This is my flutter_launcher_icons config:
flutter_icons:
android: true
ios: true
image_path: "assets/icon/icon_new2.png"
I would recommend you to use http://romannurik.github.io/AndroidAssetStudio/icons-launcher.html to generate your launcher icon : you'll be able to reduce padding to get an icon as big as possible. When you hit download, this will generate a zip archive containing a res folder with a subfolder for each size.
Let's then put manually the Android launcher icon :
In your config, put android: false so the flutter_launcher_icons plugins stops generating icons for android, and paste your generated subfolders in yourproject/android/res
I encountered the same issue as you, looks like we followed the same tutorials/links.
EDIT : If you still encounter issues, this thread may help you (almost a duplicate) App Icon on Device is too small
For all the flutter android projects, for those who are still facing issues after generating icons from here, http://romannurik.github.io/AndroidAssetStudio/icons-launcher.html follow the below steps,
Open your flutter project in Android Studio
Select the android folder and Right click
Select the option flutter->Open Android Module in Android Studio ( open in new window)
It will take a while, once its done, in the android project, right click on res->drawable folder, and create new image asset
Create the launcher icons using your image in this android studio wizard.
Once the launcher icons are created, build your apk or app bundle asusual from your flutter project. It should work fine now.
To complement the answer of the user TBG, in my case, the path where I had to put the res folder was in youproject/android/app/src/main/, replace what you have and voila, recompile your project.

Cannot Create Image Asset in Android Studio

I am on trying to add an Image Asset to my Android project. However, it keeps having this error about a file I don't even have selected.
I am on Android Studio 3.2
I don't understand where that gradient.psd came from but you may want to take a look at this solution here: Android Studio not loading image when creating new image asset
I came across this problem while importing Google logo and I worked around by having the Icon Type as Launcher Icons (Legacy Only)

how to get google play to mark unity game as designed for tablets?

i'm trying to publish my unity game on google play and i cant find an answer to this error anywhere. when i upload a 10" screenshot google play says "You uploaded screenshots for 10-inch tablets, but your APK does not seem to be designed for 10-inch tablets." when i click learn more it says "Your APK should include custom drawables assets for common tablet screen densities."
there may be a lot of answers to similar questions but i haven't been able to find an answer for the error "Your APK should include custom drawables assets for common tablet screen densities." i could be wrong but i was under the impression Unity took care of this aspect.
What do i need to do differently to fix this issue so my games is listed as "designed for tablets"? my game works and can be download on tablets... but says its not designed for them?
I solved this problem with just simple trick.
You can just check on "Include android banner" option in player setting for android build and select any image for android banner. Then unity will automatically generate res/drawable-xhdpi folder with that banner image included.
You have to just check this option on and select any image you want
here is example image
I was running into this same issue and found a solution that worked for me. Unity apparently fails to create a folder required to correctly process the APK, namely a 'drawable-xhdpi' folder that's supposed to contain a 320px by 180px image inside of the res/ folder.
Found this answer because I happen to be working on two apps at the same time — the first app was exporting without any issues, whereas the second app encountered the problem you've described.
Using Unity 2018.3.0f2, I exported the first app and the second app using Gradle via the Build Settings dialogue.
Here's a screenshot of the res/ folder from the first (working) app:
Image of res/ folder from project with all necessary folders
Here's a screenshot of the res/ folder from the second (broken) app:
Image of res/ folder from project missing one crucial folder, drawable-xhdpi
Notice how the 2nd app is missing the 'drawable-xhdpi' folder.
So I fixed this by taking the 2nd app exported project into Android Studio, manually adding the missing folder and image asset, then exporting as normal. After uploading to the Google Play Developer Console, voila! No error.
Hope this helps :-)

Launcher Icon is not Shown in Oreo 8.0/8.1

Explanation:
I have a working app in google play market. Everything works fine in
android versions from 4.0-7.0.
Case:
When the client downloaded it on his Android 8.0 (Oreo) a launcher
icon did not seem to show instead android's default launcher icon is
showing!!
Question:
Anyone who has encountered such issue? I need any hints to solve it since it seems weird because I have all 4 typed .png icons in mipmap folder.
Yes, I also faced the same issue in Android Oreo.
1) Add your images by adding in Image Vector
This might not be the ideal solution. But deleting the directory named mipmap-anydpi-v26 will resolve the issue if you have correct icons in relevant folders.
I was having the same problem make sure you have set drawable or mipmap to icon attribute as well as roundIcon attribute under application tag in your Manifest file
<application
android:icon="#drawable/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round">
</application>
This might resolve someone's issue. Thanks.
None of the previous answers worked for me. I discovered my project had a file app/src/main/res/drawable-v24/ic_launcher_foreground.xml while another project didn't. That was the reason the other project did have an icon in Android 8 and this project not. When I removed the drawable-v24 folder I got my icon back!
Try restart your mobile and install app on device
Use a .png image in the Image Asset tool to generate launcher icon.
Android -> Project -> App - > src -> res
right-click on res then -> new -> image asset -> inside add image set as your logo ratio

Tool to generate online buttons (animated) and download all the sizes

Long time ago I used an online tool but I totally forgot about the name. I could upload an image and then the buttons were generated automatically (even the xml selector) and download all of the sizes at the same time (hdpi, mpi, etc..) for Android.
Do you know any tool to do that? Where I could upload a 9patch or image and generate all the buttons?
Thanks!
There are several awesome tools in the Android Asset Studio:
Icons from clipart
Ninepatch generator
Holo resources

Categories

Resources