Do's and Don'ts for Android development

Do‘s and Don‘ts for Android development, by Futurice developers

  1. Use Gradle and its recommended project structure
  2. Put passwords and sensitive data in gradle.properties
  3. Don‘t write your own HTTP client, use Volley or OkHttp libraries
  4. Use the Jackson library to parse JSON data
  5. Avoid Guava and use only a few libraries due to the 65k method limit
  6. Use Fragments to represent a UI screen
  7. Use Activities just to manage Fragments
  8. Layout XMLs are code, organize them well
  9. Use styles to avoid duplicate attributes in layout XMLs
  10. Use multiple style files to avoid a single huge one
  11. Keep your colors.xml short and DRY, just define the palette
  12. Also keep dimens.xml DRY, define generic constants
  13. Do not make a deep hierarchy of ViewGroups
  14. Avoid client-side processing for WebViews, and beware of leaks
  15. Use Robolectric for unit tests, Robotium for connected (UI) tests
  16. Use Genymotion as your emulator
  17. Always use ProGuard or DexGuard

更多请关注原文:https://github.com/benniaobuguai/android-best-practices#use-gradle-and-its-recommended-project-structure

Do's and Don'ts for Android development

时间: 2024-10-12 00:19:43

Do's and Don'ts for Android development的相关文章

Eclipse 安装 ADT 失败的两种解决办法 [Android Development Tooling]

原因 最近想在新装的 Win7 里搭建一下 Android 的开发环境,虽然现在有 Android Studio 了,不过还是习惯 Eclipse 一点.众所周知的原因,Eclipse 直接安装 ADT(Android Develepment Tooling) 插件是不行的,这里给出两种解决办法,我们的前提是要先安装 Google 的 翻[email protected]!墙工具 GoAgent . 一.使用 Proxy 由于直接访问是不行的,所以你可以使用 VPN 或者 GoAgent 做为

Learn Java for Android Development Second Edition 笔记(六)- Interface

Interface Java里用interface关键字,引入一种没有具体实现的类型. Declaring Interfaces interface一般以大写字母开头,able单词结束,如下例子: interface Drawable { int RED = 1; // For simplicity, integer constants are used. These constants are int GREEN = 2; // not that descriptive, as you wil

Android development tools line_endings hacking

/******************************************************************** * Android development tools line_endings hacking * 说明: * 本文主要是对android源代码中的line_endings开发工具进行了解读, * 目的是为了知道传说中的额dos,unix文件之间转换的工作机制. * * 2016-5-3 深圳 南山平山村 曾剑锋 *********************

Solutions for common Android development problems with the Eclipse IDE- Tutorial

Table of Contents 1. Solving typical Android development problems 1.1. Clean Project 1.2. android.content.ActivityNotFoundException 1.3. Problems with Android Debug Bridge (adb) 1.4. LogCat 1.5. Java7 1.6. Eclipse reports file from R.java as missing

为Eclipse安装ADT(Android Development Tools)

在搭建Android开发环境的时候,我们需要为Eclipse安装ADT(Android Development Tools)插件,这个插件可以为用户提供一个强大的Android集成开发环境.通过给Eclipse安装ADT插件,用户才能够完成快速新建Android项目.创建界面.调试程序.导出apk等一系列的开发任务. 一般论坛或博客上关于Android开发环境搭建的帖子在讲Eclipse安装ADT插件的时候,都是通过在线安装的方式.不过这种方法有几大缺陷,一是由于ADT插件是从http://dl

Android Development Notes-2

Summary:SDK, ADB, Active, Intents and Tasks -The Android SDK is made of mostly off-the-shelf components, plus some purpose-built components. In many cases, configurations, plug-ins, and extensions adapt these components to Android. The Android SDK is

Android Development Notes -1

Summary: Installing the Andriod SDK and Prerequisites -Successfully installing the Android SDK requires two other software systems that are not part of the Android SDK: the Java Development Kit (JDK) and the Eclipse integrated development environment

Android开发 Unity3D基础 Android Development

开发环境 Window 7 Unity3D 3.3.0 MB525 defy Android 2.1-update1 本次学习: 1.认识Unity 2.Unity3D环境搭建与Android软件生成 3.Unity3D基本使用方法 1.认识Unity3D Unity3D是一个让开发者能够在多平台制作同一款游戏的游戏开发工具,有专业的图像处理和游戏引擎,能做出各式各样的游戏. 羽化以前认为Android游戏开发只能在Eclipse里面死活敲代码,也许是自己阅历不够,不知道游戏引擎能给游戏开发带来

Android Development Environment ADT-BUNDLE android-studio SDK ADT Download

Android ALL VERSIONS DOWNLOAD (64GB ZIPPED) LINK : http://pan.baidu.com/s/1c2v4mXE password: h2mc -- SIZES: -- schema : Android Studio : http://tools.android-studio.org/; Android 开发环境介绍 : 目前 Android 有两种开发环境, 一种是传统的 Eclipse + ADT, 一种就是目前最新并且得到 Google