Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Android Drawable Importer ignore selection in AS 3.5 onwards

After right-click --> new Batch Drawable Import and selecting any .png from the Select Image Asset(s) box, the primary Batch Drawable Importer box remains empty (ie: the selection was ignored!).

First 2 lines of Event Log:

java.lang.NoSuchMethodError: org.jetbrains.android.facet.AndroidFacet.getAllResourceDirectories()Ljava/util/List;
    at de.mprengemann.intellij.plugin.androidicons.util.AndroidFacetUtils.getResourcesRoot(AndroidFacetUtils.java:48)

So apparently Android Drawable Importer is fundamentally broken under the more recent AS / intellij versions.

I downloaded and re-installed android-drawable-importer-intellij-plugin-0.5-81.zip to no effect. This plugin was last built in 2016.

This leaves me stuck, because the new Android Studio Resource Manager Import Drawables function does not allow me to pick an external 256x256 .png and then automatically resize for mdpi, hdpi, xdhpi etc.

I have noted the issue (see comment).

Any circumventions or alternatives?

like image 516
Bad Loser Avatar asked Jan 23 '20 03:01

Bad Loser


People also ask

How do I make a drawable Xxhdpi folder?

Simply go to project Explorer and change your View from Android to project from drop Down and you are good to go. There you can simply create folder like we do in Eclipse. And in android project view it is hidden but when you switch to project. You can create folder like drawable-hdpi,drawable-xhdpi .

What are Drawables in android?

A drawable resource is a general concept for a graphic that can be drawn to the screen and which you can retrieve with APIs such as getDrawable(int) or apply to another XML resource with attributes such as android:drawable and android:icon . There are several different types of drawables: Bitmap File.

What is drawable folder in android directory?

In Android Studio inside the res folder, one can find the drawable folder, layout folder, mipmap folder, values folder, etc. Among them, the drawable folder contains the different types of images used for the development of the application.


1 Answers

There were multiple issues preventing operation of this plugin in later releases of Android Studio.

Forked, fixed and tested under Android Studio 3.6 RC 1.

Guinea pigs may download the plugin installation zip from here.

( AS -> Settings -> Plugins -> Install from disk )

Tip: Uninstall the old version beforehand.

like image 172
Bad Loser Avatar answered Oct 23 '22 06:10

Bad Loser