Google+ Badge

Tuesday, June 18, 2013

Why I stopped using Android Studio - for now

I was pretty happy using Android Studio. Loved the way I could see the preview of a layout while working on the layout. I had written a new app from scratch to match the functionality of our current iPhone app using Android Studio. I also like the dark theme they provide. Easy on the eyes.

Then I ran into a problem that made me stop using it. I wanted the app to run on more devices so I turned towards ActionBarSherlock. I found various posts on Stack Overflow on how to make it work. I tried them all but was ending up with some weird gradle errors that I was unable to solve.

Gradle: A problem occurred configuring root project '{my project}'.
> Failed to notify project evaluation listener.
   > Main Manifest missing from /Users/kpeck/AndroidStudioProjects/{my project}/AndroidManifest.xml

I have a manifest file of course. It is not in the directory given. I even tried to copy my the file to that directory, even though it does not belong there, and attempted the build again but it still did not work.

It is possible that starting a project from scratch with ABS in it and then copying in my files may work. I will have to give that a shot at some point.

Having run ActionbarSherlock under Eclipse in the past I knew pretty much what to do and had it up and running in a matter of minutes. Import the project into the workspace, delete the duplicate android-support-v4.lib, set the dependency between ABS and my project and it was working. I spent the rest of the day converting code to ABS format. That was generally pretty easy with a few minor snags around loaders.

At some point I may go back and attempt to get it working in Android Studio but right now I need to move forward on the project. I have other areas that I want to convert to activities hosting fragments. Currently I only converted the one that needed a loader but I have some ideas on how to layout items on a tablet that would benefit from fragments.

Android Studio keeps changing the way you deal with project settings. It was through a dialog but now they want you to manually edit things in the build files. Somethings happen automatically as you import but it does not seem to finish the job. It is still alpha software and they are pushing out changes quite often. I want to get familiar with gradle but I don't have the time to pause right now and do that.

I also found the preview has some issues especially with Relative Layouts. The above / below / left / right layout parameters seem to be suggestions in the preview. They work fine in the emulator or on a device but that gets frustrating. I may see the screen look just right in the preview then a change to the XML in an area unassociated to the Relative Layout will cause it to paint incorrectly, usually overlapping controls. Really need a preview I can trust so I am not chasing down issues that don't exist.

Probably good to wait another release or two of Android Studio. There will be more tutorials on how to make things like ABS work with it and I can skip the headaches. Back to trusty old Eclipse for now. I found a dark theme that is reasonable for it but it only changes the editor pane. That is the largest part of the screen so it is better than nothing.