intellij Querk or not - android

I just started using intellij and I just noticed that when it sets up your initial res folders it does not include the Drawable. I know that I can just add the folders no big deal, I was just a wandering why. Then again maybe I have done something wrong.

As you can notice from the log in this video, res/drawable* folders are created by Android SDK tools. It's not handled by IDEA, it's a feature of Android SDK.

Related

Cannot click next in Asset Studio when creating an icon

Not sure where to post this issue I have with Android Studio IDE, I hope it can be answered here.
When I open the Asset Studio in Android Studio by right clicking on my Android Module and selecting new -> Image Asset I cannot get past the first screen. Even when I leave this default, when I try and press next the Asset Window start shaking shortly after a second or two.
I encountered this problem with a prior version of Android Stuido but an update to the latest version did not help.
I tried updating the android SDK and build tools since they are obviously related but without success.
I tried restarting Android Studio but the "bug" still remains.
Perhaps I am doing something wrong, I created a video of my workflow and the issue I am encountering.
I had the same problem.
In the Legacy tab, I set the Google Play Store Icon to No and I could pass the first screen.
I had exactly the same problem while I was trying to create adaptive icon from vector graphics.
What helped me was that I need to set Size to 108 dp x 108 dp when I imported Vector Asset (res -> right click -> New -> Vector Asset).
I have faced the same issue with vectors that had a dashed line. Android Studio doesn't support dashed-strokes by default. You can check what is not supported in this link Dashes stroke-dasharray in Android Vector. So in such cases Android Studio just doesn't show any error upfront.
In your case I see its happening even for normal vectors.
To check why its failing notice every time it fails the exclamation mark at the extreme bottom right of Android Studio turns red and flashes. Just close pop up window of Android Studio and click on the red exclamation mark. It will give you the reason why its failing. Although there was nothing much I could do about it maybe you can figure out whats wrong.
I know it's been answered but here's another thing that might fix someone else's problem when adding an asset and getting the weird shaky window error: check the asset dimensions you're importing.
I was trying to add a Vector Asset with dimensions about 23dp x 1077dp (really big height and small width), and for some reason Android Studio didn't accept it. After changing it to a dimension bigger than 170dp x 8137.3dp (it scales automatically) it worked. Then I went on the .xml file and changed it to a dimension I wanted, preserving the proportion of mostly 200dp in width or height as prompted by Lint in a warning.
I don't really know why it worked but I managed to add the asset. If anyone knows it, feel free to explain.
Steps:
1) Have you tried setting it manually through file explorer/directories etc.?
2) Maybe try a drawable importer? Like this.
3) Have a look at this answer, it might help.
4) Try completely uninstalling Android Studio, re-download and install again, if all else fails.
As per your project structure, I believe this is not a native application.
That's right, Flutter projects are not Android projects. Many Android tools are enabled only for projects that have an Android facet. Adding that to Flutter projects causes many problems, so we don't do that and this functionality available for only in native android application.
Furthermore,If you want to use may be it'll help you.
Open android studio File->Open folder->navigate to your flutter project and select the Android folder. Wait for it to sync, then navigate inside the Android studio folder and find the res folder right click on it and choose New you will see the Image asset studio.
This happened to me and the problem was that the dimensions of my source image were too small, which I think is the takeaway from all the other answers as well.
In my case the issue was caused by some unusual project structure, including some source directories added manually within the module.
The only solution was to create a new sample project in Android Studio, use the Asset Editor, generate all the assets to finally copy those to my "unusual" project.
One could also read the IDE (Android Studio) logs to see exception that are being thrown when the editor windows shakes as it's described by the Author of this thread.

drawables not in app directory and not adressable

i recently started the android tutorial from android.com, after downloading and installing Android Studio and the sdk. I made the first app and all, working directory is on a Flashdrive, Android Studio and sdk are on the HDD.
I'm currently stuck at the "Adding action bar buttons" tutorial, as android studio doesnt find "#drawable/ic_action_search".
I understand that it should be in the MyfirstApp/app/src/res/drawable- folders, but those are practically empty (see picture below).
I did find an answer on here that states to simply copy the required drawables from sdk/platforms/android-/data/res/drawables-.
Another one states, I can adress "standard" pictures (like the search action icon in my case) by using "#android:drawable/ic_action_search", but that doesnt work at all.
Is there a good workaround, easier then putting every icon in every corresponding folder, every time i need one? The tutorial doesnt have that, it seems the guy writing the tutorial relied on the icons just being there?
(May solve itself with 1.)
In that other folder, there are many, many drawables, but the one folder I searched (drawable-hdpi) doesnt even have an icon called ic_action_search.png so...where do I usually get that?
Thanks for helping, I'm still hoping this is a common mistake so there's an easy solution here^^
Edit: manually starting the gradle build task doesn't work either, same problem.
()
Does your project build? Try running the gradle build task manually.
screenshot

Need explanation on Project Tree Android Studio

I may be missing something here but, how come my android project tree used to look like that when I created my first project 5 months ago (with folders like .idea, build, or R.java)
And now, I've just created a new projet and it looks like that :
Did I make a mistake at some point ? How can I display all the folders and files like R.java ?
Thank you.
If you look at the files outside of Android Studio, you should find that the structure is nearly identical.
What you are seeing is the new Android project view. Note that at the very top of your screenshots the first one says "project" and the second one says "Android."
The Android project view simplifies the way the information is present a bit- for example, it will put all your Gradle scripts together and it will combine drawables with the same name to make finding different versions of the same drawable a bit easier.
If you don't like the new view, you can click on "Android" to see a dropdown containing other options, including the old Project view.
Sorry, silly mistake : the view was different.

Phonegap icon system

I've been working on a Phonegap project (Android and iOS) for 2 months now. Everything works fine and is surprisingly fast once you play around for a while.
Except one thing. I fail to understand how Phonegap handles icons. After a while I have noticed that the "res" folder for my iOS project wasn't being used, instead it was using icons in "platform/ios/projectName/Resource/icons". I've moved all my icons/splash screen in there, linked all of it in my xcode project and everything work fine.
Now I'm struggling with Android, hacking my way in that "drawable" folder of the Android platform folder, failing to understand the role of the config.xml in all of this.
Anyway here are my questions:
What is the purpose of the icon references in "www/config.xml" if when it comes to building for a platform, it ignores those paths and actually looks for icon/splash screen elsewhere?
What is the purpose of the res folder/subfolder naming, if the build function just blindly copies everything in each platform folder (having blackberry references/png in iOS config/folders).
Where should I put the android splash screen image and what's the correct naming? (when i copy the one from "www/res/screen/android" into the "drawable" folder, the build fails for incorrect naming).
Basically, what's the Phonegap expected workflow for icons & splashscreens?
The references listed in config.xml are for Phonegap Build. This link might help:
http://devgirl.org/2013/09/12/phonegap-icons-and-splash-screens-help/

IntelliJ Android cache build with drawables ignores changes

I have a minor issue with the way IntelliJ caches files or builds (not sure about terminology here).
Situation Abstract:
Library module
DrawableA
DrawableB
App module
DrawableA
Assume library images are black and white, App ones are color.
The app shows (correctly) the colorful A.
The app shows (correctly) the black and white B (means its missing).
Now I add an image to App project, Drawable B, in color.
If you simply press "run" he will keep using black and white B
If you "rebuild project" he will use the correct one
If you try "Make" and "Compile" manually on Lib and App NO EFFECT
To clarify, this issue is really special. It only occurs if the DrawableB is NOT present in the App module. If you have it, but the WRONG one, and you update it, it works. I assume its an internal caching of IntelliJ, and he does not recognize that I added a drawable (and he has to use it from the App now, not the LIB). Perhaps its something in the google build of Android projects, not enough info about the internal here...
I know, the obvious tip is "do a rebuild of the whole project" - that said, I have 18 App modules, each for one App. The rebuild takes forever (on one of our machines without SSD), and its not neccessary. If I change something in e.g. AppX, I only need to rebuild AppX and the Library. But there seems to be no option for it.
Does anyone know a workaround, like deleting BIN or other cache folders via script? Cant split up the modules in different "projects", would loose refactoring capabilities.
Crosspost here, check before wasting time to answer (this site here is more frequented and faster, but this issue is so specific, cant hurt to ask the developers too)
http://devnet.jetbrains.net/message/5446674
Try to rebuild project. Smtm i have same problem and it helps me.
Can you try it with the new IntelliJ Idea version 12? It seems to handle cached resources pretty well.

Categories

Resources