自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(75)
  • 资源 (13)
  • 收藏
  • 关注

原创 Gson之GsonBuilder用法笔记

Gson是非常强大的API,它支持Java泛型,支持现成的JSON与Java对象的转换,只要对象的成员名称与JSON中的一致即可。如果针对Java bean和JSON要使用不同的名称,那么可以使用@SerializedName注解来映射JSON和Java类中的变量。

2015-09-14 15:42:31 3804 2

翻译 Data Binding官方用户指南

Data Binding GuideData Binding即数据绑定,Data Binding 库实现在布局文件中实现数据绑定申明,使数据的变化引起视图的自动更新,减少了逻辑代码,在Android中可以很方便的实现MVVM的开发模式。

2015-09-10 14:04:04 1133 1

翻译 Material Design之TextInputLayout使用示例

Google在2015的IO大会上,给我们带来了更加详细的Material Design设计规范,同时,也给我们带来了全新的Android Design Support Library,在这个support库里面,Google给我们提供了更加规范的MD设计风格的控件。最重要的是,Android Design Support Library的兼容性更广,直接可以向下兼容到Android 2.2。这不得不说是一个良心之作

2015-08-05 17:49:33 3160 3

原创 DEX 方法超过64K限制和gradle编译OOM问题解决

如果你是一个Android开发者,你至少听说过的Dalvik的蛋疼的64K方法限制。概括地说,在一个DEX文件,你可以调用很多的方法,但你只能调用它们最前面的65,536个 ,因为这是在方法调用集合中的所有的空间了,你有。如果你的源代码和炫酷的库中方法超过了这个限制。看这篇文章就对了。

2015-08-01 20:24:06 7169

原创 关于Android中的strings.xml的一些其他用法

String XML resource that provides a single string. String Array XML resource that provides an array of strings. Plurals XML resource that carries different strings for different pluralizations of the same

2015-04-02 22:50:46 1570

原创 umeng消息推送获取不到DeviceToken解决方案

参考了下http://bbs.umeng.com/thread-5547-1-1.html1.请先检查使用Demo能否正常工作2.确定是否将appkey、MessageSecret、以及包名都更换为开发者所申请的相应值3.确定是否将Manifest里的几个intent的前缀更换了如果使用的是自定义IntentService :确定是否调用PushAgent里的方法set

2015-01-20 09:23:48 10508

原创 listview自动滚动动画

效果图如下:动画代码: AnimationSet set = new AnimationSet(false); Animation translateAnimation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELAT

2015-01-19 14:50:59 2737 2

原创 测试机按返回键整个应用退出问题解决

问题描述:以前都好好的,结果现在不管打开多少个activity,只要按返回键整个应用退出问题解决:原来是误勾选了 不保留活动这项,取消勾选就好了

2015-01-08 12:39:47 781

原创 android studio logcat看不到日志

如图:后来点了下右上角,原来是视图错了。又可以快乐的调bug了

2015-01-08 11:04:27 4997 2

原创 Android Studio 运行出现 Multiple dex files define Landroid/support/annotation/AnimRes;解决方法

问题描述Error:Execution failed for task ':app:dexDebug'.> com.android.ide.common.internal.LoggedErrorException: Failed to run command: E:\DevResources\sdk\build-tools\21.1.2\dx.bat --dex --no-optimi

2015-01-08 10:37:07 17078 4

原创 Anroid ListView分组和悬浮Header以及下拉刷新功能实现

先上效果图默认状态:下拉刷新滑动中滑动后:核心代码:package com.boredream.demo.pinnedheaderlv;import java.util.ArrayList;import java.util.Collections;import java.

2015-01-05 15:40:05 3085 1

原创 Android Studio中增加google-service-lib

新建Module,选择Android Library填写包名然后就是当代码的搬运工,eclipse对应的代码拷贝过来即可。

2014-12-29 16:02:14 1189

原创 AndroidStudio自定义属性xmlns无法识别问题解决in Gradle projects,always use http://schemas.android.com/apk/res-auto

正如in Gradle projects,always usehttp://schemas.android.com/apk/res-auto for custom attributes所说的将eclipse中 http://schemas.android.com/apk/res/com.xxx.xxx换成 http://schemas.android.com/apk/res-auto

2014-12-24 11:22:24 25219 7

原创 Initializing a Build Environment

Initializing a Build EnvironmentIn this documentChoosing a BranchSetting up a Linux build environmentInstalling the JDKInstalling required packages (Ubuntu 12.04)Installing required pa

2014-12-23 10:23:54 933

转载 获取Map地图 经纬度与所处地理名称 相互转化

原地址什么是Geocoding?Geocoding API是一个供程序员调用的、http形式的地图服务接口。主要服务那些非网页程序的调用。例如C# 、C++、Java等开发语言都能发送http请求且能接收返回数据。用户只需在请求的url字串中拼接好关键字或者经纬度信息,即可获取到相应的百度经纬度或者结构化地理信息。Geocoding API有哪些功能?G

2014-12-19 17:51:05 1941

原创 gradlew运行所有可选项及解释

E:\AS_Workspace\BuildDemo>gradlew --helpUSAGE: gradlew [option...] [task...]-?, -h, --help Shows this help message.-a, --no-rebuild Do not rebuild project dependencies.-b, --buil

2014-12-19 11:00:50 4729

转载 让gradle常驻内存,加快项目构建速度

给gradle加上daemon选项,让gradle常驻内存, 下一次再调用时就会重用内存中的gradle,而免去加载时的消耗,如gradle assemble --daemon第一次调用时输出如下(耗时8.662秒):E:\code\android\ZeroWeiProject>gradlew assemble --daemon :ZeroWei:preBuild

2014-12-19 10:43:55 3149

原创 Failed to read key from keystore解决方案

异常信息:Caused by: org.gradle.tooling.BuildException: Failed to read key from keystore at com.android.build.gradle.tasks.PackageApplication.doFullTaskAction(PackageApplication.groovy:110)

2014-12-19 09:55:11 30078 2

原创 Task 'XXX' not found in root project 'BuildDemo'. Some candidates are: 'dexProductDebug'解决方案.

具体错误信息:org.gradle.execution.TaskSelectionException: Task 'productDebug' not found in root project 'BuildDemo'. Some candidates are: 'dexProductDebug'. at org.gradle.execution.TaskSelector.ge

2014-12-19 09:49:09 16843

原创 Could not find property 'zipAlignEnabled' on com.android.build.gradle.internal.api.ApplicationVarian

针对1.0中新版Gradle已经做了以下替换:Renamed a few properties to make things more consistent.BuildType.runProguard -> minifyEnabledBuildType.zipAlign -> zipAlignEnabledBuild

2014-12-18 17:47:49 3116

原创 【Gradle】build.gradle多渠道生成apk到指定目录,带时间,带zipAlign优化

build.gradle:import java.text.DateFormatimport java.text.SimpleDateFormatimport java.util.regex.Patternconfigurations { deployerJars}buildscript { repositories { mavenCentra

2014-12-18 15:57:22 3523 3

原创 build.gradle配置变量,在Activity中使用

build.gradle代码片段 完整版apply plugin: 'com.android.application'apply from: rootProject.file('gradle/signing.gradle')apply plugin: 'android-checkstyle'apply plugin: 'android-pmd'android { ...

2014-12-18 15:35:12 5570

原创 Gradle命令行编译android应用

clean,build,install....To clean project:./gradlew cleanTo build project:./gradlew buildTo assemble code without checking and install debug version of the application on a device:

2014-12-18 15:19:31 5747

转载 用 Gradle 来构建简单系统

用 Gradle 来构建简单系统准备环境:下载 gradle-0.9-preview-1 从 http://dist.codehaus.org/gradle/?ref=darwinports.com网站上选择一个版本,然后解压到指定目录,将 Gradle 的 bin 目录添加到 Path 变量中。使用 cmd 命令,然后敲入 gradle – version,如出现以下

2014-12-18 13:48:46 1325

原创 Android Studio选择默认运行build variant(debug,Release...)

选择窗口左下角的build variants ,然后选择对应的variant就之后运行就是对应的版本了

2014-12-18 13:21:47 15310 1

原创 Android Studio http://schemas.android.com/apk/res/android “URI is not registered”解决方案

问题出现描述:For me this was because I was using a debug and release build variant. I added the new folders src/debug/res/layout/some_layout.xml file manually, and it didn't recognize the URI. 使用build

2014-12-18 12:29:05 37819 5

翻译 【Andrioid】在Gradle中编译一次生成不同的版本,动态设定应用标题,应用图标,替换常量

写项目的时候经常会遇到以下的情况:1.需要生成测试版本和正式版本的apk2.测试版本和正式版本的URL是不一样的3.测试版本和正式版本的包名需要不一致,这样才能安装到同一部手机上面。4.不同apk需要应用名不同,图标不同,某些常量不同....如果你有以上的需求,看这篇文章就对了

2014-12-18 11:50:39 3131

原创 【PPT】The new (or the first?) build system for Android

https://docs.google.com/presentation/d/1s6D1GwjKeoG9cEsTEXlWPGyo6kbLFNB6EXxsUtDB9IA/edit#slide=id.g12412b01_0_68

2014-12-18 11:01:53 620

原创 Android Studio删除Module

今天刚刚接触google发布的Android Studio。因为我都是使用eclipse来着,所以上手IDEA不是特别的快,修改快捷键和调试中文问题弄了很长的时间。幸亏在下天资过人。。。现在把我遇到的最另类的东东分享出来,那就是删除Module。1 首先右键你要删除的Module。2 我们往下看找到open module settings3 点击,会有一

2014-12-16 16:35:15 1533

原创 怎样用Java.net.URL表示一个本地目录下的文件?

URL source = new URL("file:///D:/Users/workspace");

2014-12-16 11:43:47 2072

原创 Android Studio下Svn忽略文件配置的几种方法

新建项目的时候Android Studio向导会创建两个.gitignore,对应的,我们创建两个.svnignore就可以了。里面配置信息可以参考.gitignore,具体配置信息可以参考github推荐的.gitignore写法# built application files*.apk*.ap_ # files for the dex VM*.dex #

2014-12-15 17:46:24 14658

原创 Gradle离线工作设置方案

File--Settings(Ctrl+Alt+S),在Gradle中选择本地的位置,勾选Offline work

2014-12-15 16:05:35 3513

原创 【Android Studio】Gradle Plugin User Guide

Gradle Plugin User GuideContents1 Introduction1.1 Goals of the new Build System1.2 Why Gradle?2 Requirements3 Basic Project3.1 Simple build files

2014-12-15 15:35:10 2312

原创 【Android Studio】Manifest Merger

Manifest MergerContents1 Manifest files ordering2 Android Manifest file merging3 Elements and Attributes merging process3.1 Implicit declarations3.2 A

2014-12-15 15:27:40 7024

原创 【Android Studio】Resource Merging资源合并规则

Resource MergingThe Gradle-base build system uses a new merging mechanism for resources. In previous build system, merging was done by passing a list of resource folders to aapt which ac

2014-12-15 15:23:34 4681

原创 【Android Studio】Migrating From Eclipse Projects

Migrating From Eclipse ProjectsTo migrate an Eclipse project to an Android Studio project, you have two options:Importing the Eclipse project directly into Studio. This is the pr

2014-12-15 15:19:44 988

原创 【Android Studio】Resource Shrinking去掉无用的资源

Resource ShrinkingThe Gradle build system for Android supports "resource shrinking": the automatic removal of resources that are unused, at build time, in the packaged app. In addition

2014-12-15 15:16:53 11451 1

原创 【Android Studio】Android Studio和Gradle版本兼容性说明

Version CompatibilityPost 1.0 CompatibilityStarting with Android Studio 1.0 and the Gradle plugin for Android 1.0, compatibility is a critical requirement.While we are still

2014-12-15 15:09:10 3750 1

原创 【Android Studio】Android Studio Migrating Gradle Projects to version 1.0.0

http://tools.android.com/tech-docs/new-build-systemThe Android Gradle plugin has been in rapid development, and as features evolved the APIs and the build file description language went th

2014-12-15 15:04:32 1522

原创 android studio 安装gitignore插件

idea-gitignorehttps://github.com/hsz/idea-gitignoreInstallationUsing IDE built-in plugin system:Preferences > Plugins > Browse repositories... > Search for ".gitignore support" >

2014-12-15 12:27:52 5379

数字图像处理常用测试图片

数字图像处理常用测试图片

2022-04-25

listview自动滚动

listview自动滚动,对应效果:http://blog.csdn.net/nwsuafer/article/details/42873311

2015-01-19

Anroid ListView分组和悬浮Header以及下拉刷新功能实现

Anroid ListView分组和悬浮Header以及下拉刷新功能实现 http://blog.csdn.net/nwsuafer/article/details/42423573

2015-01-05

Ueditor1.4.3.1 for wordpress 4.0插件

Ueditor1.4.3.1 for wordpress 4.0插件

2014-12-20

Android动态截取圆形头像

Android中选择头像的时候,就动态截取圆形的

2014-10-20

传智播客_Java培训_毕向东_Java基础源代码 二十五天免费下载

传智播客_Java培训_毕向东_Java基础源代码Code

2014-02-23

多自由度强迫振动方程

MATLAB用中心差分法实现多自由度的振动问题。非常好用。

2013-11-18

myeclipse8.6注册机

Myeclipse Standard Edition Myeclipse Professional Edition Myeclipse Spring Edition Myeclipse Blue Edition

2011-12-14

MyEclipse注册机

MyEclipse注册机免费下载 支持myeclipse8.5

2011-12-14

VS2010 官方Uninstall 卸载工具

VS2010 官方Uninstall 卸载工具 网上找了很久的,跟大家分享一下

2011-05-27

jce等jar文件打包下载

jce等jar文件打包下载,支持免费下载的哦

2011-04-13

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除