Android Development Notes (112) Development tools

Source: Internet
Author: User
Tags sqlite database tortoisesvn

Eclipse/adtadt is the environment where Google encapsulates Android development tools based on Eclipse, the latest version is released on July 2, 2014 adt-bundle-windows-x86_ 64-20140702, after Google launched its own development environment, Android Studio, it will no longer update ADT. However, many apps are currently being developed using ADT based on the extensive use of eclipse.


The steps to install the plugin on eclipse are as follows: Select Menu "Help"--"Install New software ..."--"ADD"--Enter the plugin name and update address and click ok-- Go back to the Install page and tick the plug-ins you want to add and click Next to complete the installation. Here are a few common eclipse plugins:


The version control plug-in SVN plugin allows developers to make code-versioning operations directly within Eclipse, such as checking out items, committing files, updating files, viewing logs, and more.
SVN plug-in name: Subclipse
Update Address: http://subclipse.tigris.org/update_1.12.x
Is the operation of the SVN function menu:



The anti-compile plugin decompile plugin allows us to view the source code of the SDK directly in Eclipse, as well as the source code of other third-party SDKs, to quickly understand how each feature is implemented.
Name of the anti-compile plugin: Eclipse Class decompiler
Update Address: Http://opensource.cpupk.com/decompiler/update


Code Coloring Plugin This plugin helps developers quickly build a no-style editing color scheme, leaving eclipse with a dull white background and becoming more personal.
Code coloring plug-in name: Color Themes
Update Address: Http://eclipse-color-theme.github.com/update


The database management plug-in supports direct viewing of table records in the SQLite database in Eclipse, enabling developers to manage database records.
Name of the anti-compile plugin: Sqlitemanger
Install package: Http://pan.baidu.com/s/1pKJru0F, and then place it in the plugins directory under the Eclipse installation path.
The following is the use of the plug-in, note that only database files with the extension db are viewable.




The file browser plugin has used the Xcode developer to know that it has a very functional show in finder that can quickly navigate to a file. This plugin is for developers to be able to open the directory of the selected file, as long as the code file right-click on the right-click menu, select "Explore in File System", you can view the file in the Document Management window.
File browser plug-in name: Explorefs
Update Address: http://www.junginger.biz/eclipse/
The following is the right-click menu for the plugin:



Android Studioandroid Studio is Google's own Android development tool, the current stable version has reached 2.1.1, as Android Studio continues to evolve, more and more apps will be migrated to the platform.


FAQ Below are a few of the issues I encountered during my use of Android Studio:
1. First time to open studio error "Unable to access Android SDK Add-on List"
This interface does not have to be tube, click Cancel. After entering the studio home page, set the path of the SDK, JDK, NDK, respectively, in "File"--"Project Structure"-"SDK location". Set up, and then open it will no longer error.
2. Create a new project on studio error "Failed to Resolve:com.android.support:appcompat-v7:23"
The reason is that the "Android Support Library" version of this library is less than 23, you need to open "SDK Manager.exe" to upgrade the library to the latest. Once the upgrade is complete, auto-recompile after restarting studio will not report this error. Also note that the compile value of the dependencies segment in the Build.gradle file is consistent with the library version of the Android support library, otherwise it will be an error.
3, Studio often error "cannot resolve symbol ' R '"
Studio will be intermittent, unexplained, can choose "Build"-"clean Project" after the re-editing.
4, run the project times wrong "Compilesdkversion ' android-24 ' requires JDK 1.8 or later to compile."
Studio default specifies the highest version of the SDK (currently 24) to compile, and if the JDK on the developer's machine is not version 1.8, an error will be made. There are two solutions, one is to upgrade the JDK to 1.8, and the other is to modify the Build.gradle file to lower the value of compilesdkversion (as dropped to version 19).


Using Svnandroid Studio comes with the SVN plugin, subversion, but needs to be configured by the developer to use SVN functionality properly. The specific configuration steps are as follows:
1, installation TortoiseSVN
To install TORTOISESVN, select command line client tools so that the svn.exe can be found in the Bin directory after installation.
2. Configure the TORTOISESVN command line tool in Android Studio
"File"--"Settings"--"Version Control"--"Subversion"--the Browse button on the right side of "User command line Client" selects the locally installed Svn.exe
3. Using SVN to check out a project in Android studio
"VCS"--"Checkout from Version Control"--"Subversion"
4. Update/Submit SVN
Right-click the project and select "Subversion"-"Update File ..." (from SVN) or "Commit file ..." In the right-click menu (submit files to SVN)


The steps to install plug-ins in Android studio are similar to eclipse by selecting the menu "File"--"Settings"--"Plugins"-"Browser repositories ...", Then pop up a window of the list of currently available plugins, select "Code Tools" in the Category box of the window--Select the specified plugin--click on the "Install" button in the right window, and restart studio after installation to use the plugin function normally. Here are a few common studio plugins:


Android parcelable Code generator The plugin can automatically generate Parcelable interface codes. The developer first writes out the definition of a class and an internal variable, and then presses Alt+insert in the code, with the "parcelable" entry below the list of menus, as follows:

Select to insert the code that implements the Parcelable interface in the class.


Android code generator The plugin can quickly generate corresponding activity, Fragment, Adapter, menu and other code according to the layout file. Right-click on the layout file, or right-click inside the layout file, the popup right-click menu has a "Generate Android Code" option with the following menu:

When the build item is selected, the Code window pops up and the generated code is copied out. However, note that the plugin does not support Chinese characters, and if there is a Chinese character in the XML file, the code generates a failure.


Gsonformat the plug-in can quickly convert a JSON string into a code snippet, including variable definitions, and set and get functions. Press Alt+s in your code, pop up the JSON format window below, paste the JSON string into the window, and click the OK button to insert the generated code snippet in your code. The Gsonformat's pop-up window looks like this:



Android Postfix Completion The plugin supports the quick generation of toast, log, and other lines of code in the code, and the developer enters the string in the code followed by ". Toast" and returns, To generate a toast.maketext line of code, enter a string, and then enter ". Log" followed by a carriage return to generate the LOG.D line of code. Here are the specific actions:



Android drawable Importer The plugin can automatically generate images of different resolutions for a single image, making it easier to fit your pictures to different screens. Right-click any directory, select "New" in the right-click menu, and a menu item such as "Drawable importer" appears at the end of the menu list that pops up to the left, as shown below:

We usually select "Batch drawable Import", select the picture file path in the pop-up window, tick the resolution that needs to be automatically generated, and then click the OK button to generate the corresponding picture in the directory of Drawabe resolution.





Click here to view the full list of Android development notes

Android Development Notes (112) Development tools

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.