Migrate from Eclipse to Android Studio
Recently, we’ve been talking quite a bit about the Android Studio IDE. Launched originally at Google I/O 2013, Android Studio aims at replacing Eclipse + Android Developer Tools, and bringing a few niceties such as live code rendering for different layouts.
As with any big change, some developers have experienced a few growing pains ranging from differences in handling external libraries to pains during initial setup. Aside from problems, just learning a new way of doing things can also be a hassle. Luckily, XDA Forum Member JoshieGeek has a guide in our App Development Forums geared at helping developers make the move to Android Studio.
The guide begins by giving a brief overview of the IDE, as well as pros and cons when making the switch. Then, JoshieGeek covers installation across three platforms (Linux, Mac, and Windows), as well as creating your first project. Next, he covers the differences in exploring your project when compared to Eclipse, as well as how to view your app in different layouts. Finally, the guide covers how to generate a signed APK.
How to Use Google Play Services Library with Android Studio
We’ve written about Android Studio a few times in the past. Google’s would-be replacement for Android Developer Tools first made its appearance at Google I/O 2013. Based on Jetbrains IntelliJ, Android Studio offers many benefits over the older ADT such as live code rendering to see how your app will look across a variety of devices and layouts, as well as the ability to easily add any Android API into your app’s code. However, the transition hasn’t been without its share of growing pains.
One such issue that has popped up isn’t an issue per se, but rather a difference in how things are done. Since Android Studio is based on Gradle-build, the way it references external libraries (such as Google Play Services) is a bit different. Luckily, XDA Forum Member JoshieGeek has already gone through the process of learning how this is done, and has shared it in our App Development forums.
If you’re a developer looking to make the switch to Android Studio but you’ve either held back due differences in external library support or have just been waiting for the growing pains to subside, JoshieGeek’s guide will likely be of use. Make your way over to the tutorial thread to get started.
Android Studio 0.2.4 Released, Improvements for App Devs
Back at Google I/O 2013, Android Studio was released in beta form. The tool, which was released with the help of Jetbrains and based on IntelliJ, featured various “killer features” such as live rendering of your code and the ability to easily add any API into your code.
Since then, we’ve talked a little about it, including troubleshooting tips for setup and a graphing library compatible with the tool. Now, version 0.2.4 has been released, bringing with it several key improvements, including:
- XML attribute documentation
- The ability to jump between a layout and its associated activity
- The ability to create missing onClick handlers
- Improvements to the Gradle synchronization
- Improvements to layout editing and various bugfixes
To get your Android Studio updated, you simply have to restart it or manually check for updates (Help -> Check for Updates). To learn more about exactly what was changed, head over to the Android Tools Project Site.
Having a Hard Time Setting up Android Studio?
By now, most developers have heard of Android Studio, Google’s new replacement for Android Developer Tools based on IntelliJ IDEA that was launched back at Google I/O this past year. While many who have used Android Studio now swear by its ease of use, especially when targeting multiple screen sizes, device types, and resolutions, a sizeable number of users have faced difficulty in using the app.
The difficulties that users have experienced are not unexpected, however. After all, Android Studio is not a finished product. Rather, much in the way of Google’s many other semi-perpetually “beta” products, it’s still in its early access preview. Because of the difficulties he faced when trying to get Studio running for the first time, XDA Forum Member lolrenx decided to create a thread detailing his experiences with the hopes of helping future developers attempting to install Studio. Since then, others have joined in on the fun and stated their issues, as well as what they have done to overcome them (if applicable).
So whether you want to see if the issues you’re currently battling have been solved by someone else previously or if you just want to share stories of the developer daemons you’ve encountered, head over to the original thread.
Generate Blank Watch Face Template in 4 Easy Steps
The Android Wear watchface API requires developers to code everything from scratch which can prove to be a daunting task for some. However, Android Studio 1.1 aims to simplify that process, by adding a Wear Watch Face code template, allowing you to generate boilerplate code in 4 easy steps
Easily Generate Layers Projects on Windows
This Windows tool by XDA Recognized Contributor bunchies creates a Layers project ready to be imported to Android Studio. It’s a nice and easy way to get started with Layers development, so you should definitely give it a shot if you’re planning to theme some Android elements.
Easily Edit Classes.dex with Dex Manager
Android applications can be edited in multiple ways. The most convenient way is of course changing the source code in your favorite IDE and compiling it with the provided tools. Unfortunately not every application available for Android is open-source, and therefore easy to edit through Android Studio or Eclipse with ADT.
Applications without publicly available source code can also be modified. The well known ApkTool is one option to make some changes, but if you are using Windows as your operating system, XDA Forum Member Jasi2169 created a nice tool able to decompile the classes.dex file directly from the APK or JAR file. With this tool, the user can simply extract the classes.dex with favorite archive manager like 7-Zip and drag the classed.dex file to Dex Manager. Everything will be decompiled on the go and extracted to the source folder as Smali files. These files can be edited and re-compiled as a classes.dex and used to replace the original file in the APK.
If something goes wrong, the user gets a an error log in the Error Box area. This should help debug the project and fix the potential build problems. A nice graphical user interface and simplicity make Dex Manager an interesting alternative to command line-based ApkTool.
You can try the application by downloading it from the Dex Manager v1.0 – Designed To Play With Classes.dex forum thread.
Micromax Takes OnePlus to Court! Android Wear Receives Lollipop – XDA TV
Android 5.0 Lollipop is available officially for the Moto 360! That and much more news is covered by Jordan when he reviews all the important stories from this week. Included in this week’s news is the announcement of Sony supporting AOSP on the entire 2014 Qualcomm Line of products and be sure to check out the article talking about the latest with Cyanogen where Micromax sues OnePlus! That’s not all that’s covered in today’s video!
Jordan talks about the other videos released this week on XDA TV. XDA TV Producer TK released an Xposed Tuesday video for BatteryHistory XXL. Then Jordan showed us a comparison of many different USB desktop chargers. Finally, TK gave us an Android App Review of Leandroid. Pull up a chair and check out this video.
Meet Jack and Jill: Android’s Experimental Toolchain
Earlier this week, Google finally pushed the stable version of Android Studio, replacing Eclipse with ADT plugin. It appears that the Mountain View company is on a roll, as they recently announced a very new and experimental toolchain named Jack and Jill.
Jack (Java Android Compiler Kit) and Jill (Jack Intermediate Library Linker) are the two tools at the core of the new toolchain. Google is encouraging developers to play with it a bit to see whether or not there are some noticeable improvements. Here’s a short explanation by Google regarding the new toolchain:
The Android Gradle plugin and Jack collect any .jack library files, along with your source code, and compiles them into a set of dex files. During the process, Jack also handles any requested code minification. The output is then assembled into an APK file as normal.
Adding Jack to the project is very easy. If you are using the 21.1.1+ Build Tools for Android Studio, you can simply add the “useJack = true” to your build.gradle file. It looks like the Android Developer team will make Jack and Jill a default toolchain for applications in the future. Right now, they are working to make the transition as smooth as possible.
More details with some code examples can be found on the Android Developers blog. Head over there to learn more.
Android Wear Watch Face API Available – XDA TV
Android 5.0 Lollipop kernel source is available for the HTC One M7 and M8 Google Play Edition! That and much more news is covered by Jordan when he reviews all the important stories from this week. Included in this week’s news is the announcement of Android Wear Watchface API and be sure to check out the article talking about Cyanogen and updating the OnePlus One globally, but not in India! That’s not all that’s covered in today’s video!
Jordan talks about the other videos released this week on XDA TV. XDA TV Producer TK released an Xposed Tuesday video for Xposed Screen Filter. Then TK showed us a comparison of many different power banks. Finally, TK gave us an Android App Review of C Notice. Pull up a chair and check out this video.
Lollipop Leak for Sprint Galaxy S5, TWRP for Micromax Canvas Magnus – XDA TV
Android 5.0 Lollipop has been leaked for the Sprint Samsung Galaxy S5! That and much more news is covered by Jordan when he reviews all the important stories from this week. Included in this week’s news is the announcement of TWRP for the Micromax Canvas Magnus and be sure the check out the article talking about the hidden Notification LED on the Google Nexus 6. That’s not all that’s covered in today’s video!
Jordan talks about the other videos released this week on XDA TV. XDA TV Producer TK released an Xposed Tuesday video for Recent App Cleaner. Then TK referees an Amazon Fire TV Stick versus Chromecast Showdown. And later TK gave us an Android App Review of AutoCon. Pull up a chair and check out this video.
Learn How to Make Your Own Theme
You don’t need graduate degrees in the arts and computer science to create your own theme. Sometimes, all you need is a little bit of the talent and a decent graphics editing program. When you are beginning your journey in theming, you can choose one of two paths: modify an existing theme using APK Tool or write one from scratch using one of available IDEs like Android Studio or Eclipse.
For most, the first option seems to be the easier one. If you want to learn how to make your own theme, probably a wise choice is to follow a guide written by XDA Senior Member DanielFlorin. By reading this guide, you will learn what it takes to create your own theme using the eXperia L Orange as a base. You need a good APKTool client, as well as some time and creativity to create your desired theme.
This method described in the guide is pretty good for beginners. You will get some experience that can be used in your future projects. Themeing can be quite difficult sometimes, so you need to understand it better before you start to make your own, more professional projects. Take into account that only select ROMs support theme engine, so be sure to run a compatible one before making your own theme.
The thread has been written to show the theming process on Sony Xperia phones, but this method can be used with other devices as well. You can learn more by visiting the Make Your Own Theme thread.
Check Gradle Dependencies with Give Me Gradle!
There are multiple ways of compiling an Android application. You can use one of a variety of IDEs such as Android Studio or Eclipse with ADT. You can also build it during the Android system compilation. Every method of compilation is different–maybe not exactly in terms of coding, but the build process as a whole.
Android Studio, for example, uses Gradle. Gradle is a project automation tool that builds upon the concepts of Apache Ant and Apache Maven and introduces a Groovy-based domain-specific language (DSL) instead of the more traditional XML form of declaring project configuration. You can check Gradle for commonly used artifacts and libraries. XDA Forum Member DaGr81 created a handy application called Give Me Gradle! that can show you the exact code on the screen of your phone. This is somewhat useful when you are planning to add new functions to your projects and keep your builds up to date.
You can search manually for artifacts or select them from a list. And after hitting the green button, a list is shown. The application should work on every smartphone with Android 4.0 and higher.
Do you use Android Studio to make your app development projects? Check Gradle and Maven dependencies on the go. Give me Gradle! will help you with this. Head over to the Give Me Gradle! application thread to get started.