GCM(5)Working with MAVEN and Android OS Upgrade 2.3.7
The latest GCM API is working fine with Android Studio and gradle. I love it. But I still need to figure out how to working and build with my old maven.
First of all, I met this Error Message
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.4.0:generate-sources (default-generate-sources) on project Localpoint_Android_SDK: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.4.0:generate-sources failed: Could not find tool 'aapt'. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME. -> [Help 1]
Solution:
>sudo ln -s /opt/android-sdk/build-tools/19.0.1/aapt /opt/android-sdk/platform-tools/aapt
>sudo ln -s /opt/android-sdk/build-tools/19.0.1/lib /opt/android-sdk/platform-tools/lib
>sudo ln -s /opt/android-sdk/build-tools/19.0.1/aidl /opt/android-sdk/platform-tools/aidl
Then I can use command as follow:
>mvn clean assembly:single
Enable Google Play Service
Get the Maven Android SDK Deployer from here https://github.com/mosabua/maven-android-sdk-deployer
>mvn clean install
And configure the android.repo and URL in pom.xml and settings.xml
>mvn deploy
One more thing, this command should be execute under maven 3.1.1 or above.
Add the Google Play Service in pom.xml as follow
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>google-play-services</artifactId>
<version>13.0.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v4</artifactId>
<version>19.0.0</version>
</dependency>
Error Message:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
Solution:
Delete the android-support-v4.jar under lib directory.
Error Message:
Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4030500 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
Solution:
/opt/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values
Check the value from this file version.xml
I add this in the AndroidManifest.xml file as follow:
<meta-data
android:name="com.google.android.gms.version"
android:value="4030500" />
But at last I found even I delete these lines, the error message did not show up anymore.
2. Building environment
Gradle eclipse plugin
http://www.gradle.org/docs/current/userguide/eclipse_plugin.html
Since I am using STS, I can easily install the gradle plugin there.
3. Upgrade my old Android OS from 2.2 to 2.3.7
Go and install the HTC Sync Manager
http://www.htc.com/www/software/htc-sync-manager/
Change the connection type of HTC to HTC Sync
Go and find this fine from HTC Android 2.3 (Gingerbread) Upgrade for HTC Desire
But my phone is old HTC G7 desire abrova, it can not find the HTC Sync. So I give other this way, and I will try other method.
Install the OS from ROM
First of all, install the get root software on my MAC system, the tool is getting from here http://www.unrevoked.com/#desire
Then use command line to disable app2sd
>adb shell
>pm setInstallLocation 0
>reboot
Then, turn off the android device, hold the button ’start’, ‘low volumn’ to start my phone into recover mode.
Choose ‘RECOVERY’ (Use Home button or Power button to select)
Download the right update.zip, and use ADB command to upload it to sdcard
>adb push /Users/carl/data/update.zip /sdcard/update.zip
Choose ‘install zip from sdcard’ (Use Home button or Power button to select)
But sometimes, I got these errors.
Error Message:
assert failed: file_getprop(“/system/build.prop”.”ro.build.fingerprint”) == “google/passion/passion:2.3.4/GRJ22/121341:user/release-keys” || file_getprop(“/system/build.prop”.”ro.build.fingerprint”) == “google/passion/passion:2.3.5/GRK39F/189904:user/release-keys”
E:Error in /sdcard/update.zip
(Status 7)
Installation aborted.
Solution:
This is my configuration file from the /system/build.prop
ro.build.fingerprint=hkcsl_cht/htc_bravo/bravo/bravo:2.2/FRF91/274424:user/release-keys
ro.product.device=bravo
So that means my device is HTC Desire bravo, I get the wrong update.zip file. So I come to this website
http://download.cyanogenmod.org/?device=bravo
I find the version http://mirror.slc.cyanogenmod.org/jenkins/3075/cm-7.2.0.1-bravo.zip
I rename it to update.zip and upload there, try again. Everything went well this time. Just reboot the system to enjoy the new OS.
References:
http://sillycat.iteye.com/blog/1998911
Tips
https://github.com/donnfelker/android-bootstrap/issues/46
http://reviews.cnet.co.uk/mobile-phones/how-to-update-htc-desire-to-android-2-3-gingerbread-50004625/
http://android.958shop.com/detail/35405.html
http://gfans.bryan.tw/2010/09/22/801
http://true-android.blogspot.com/2013/11/update-htc-desire-to-android-237.html
- 浏览: 2540029 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
发表评论
-
ionic UI(4)ionic2 framework - basic and components and native
2016-03-24 02:33 1255ionic UI(4)ionic2 framework - b ... -
ionic UI(3)TypeScript - handbook
2016-03-22 23:21 628ionic UI(3)TypeScript - handboo ... -
ionic UI(2)ionic2 framework - TypeScript - tutorial
2016-03-22 06:52 1648ionic UI(2)ionic2 framework - T ... -
Parse and Heroku Service(3)Parse Server and Parse Dashboard
2016-03-22 06:30 960Parse and Heroku Service(3)Pars ... -
Parse and Heroku Service(2)Mail Templates and Push Notification
2016-03-22 02:45 574Parse and Heroku Service(2)Mail ... -
ionic UI(1)Introduction
2016-03-19 03:18 713ionic UI(1)Introduction 1 Inst ... -
Parse and Heroku Service(1)Heroku Installation and Play
2016-03-19 00:13 815Parse and Heroic Service(1)Hero ... -
Hybrid(5)Customize Meteor Directly Google Login
2015-09-01 02:33 907Hybrid(5)Customize Meteor Direc ... -
Hybrid(4)Favorite Places - Google Login
2015-09-01 02:02 1330Hybrid(4)Favorite Places - Goog ... -
Hybrid(3)More Meteor Example - Social
2015-08-11 05:04 749Hybrid(3)More Meteor Example - ... -
Hybrid(2)meteor Running Android and iOS
2015-07-28 23:59 1040Hybrid(2)meteor Running Android ... -
Create the Google Play Account
2015-07-18 06:42 1093Create the Google Play Account ... -
Secure REST API and Mobile(1)Document Read and Understand OAUTH2
2015-07-14 00:36 757Secure REST API and Mobile(1)Do ... -
Screen Size and Web Design
2015-07-11 01:11 718Screen Size and Web Design iPh ... -
Hybrid(1)ionic Cordova meteor
2015-06-25 05:49 459Hybrid(1)ionic Cordova meteor ... -
Android Fire Project(1)Recall Env and Knowledge
2015-02-11 12:28 674Android Fire Project(1)Recall ... -
Android Content Framework(1)Concept
2014-06-14 13:54 1068Android Content Framework(1)Con ... -
Feel Android Studio(1)Install and Update Android Studio
2014-04-11 03:12 2020Feel Android Studio(1)Install a ... -
IOS7 App Development Essentials(2)iBeacon
2014-03-05 05:55 882IOS7 App Development Essentials ... -
IOS7 App Development Essentials(1) Persistent Store
2014-03-05 05:54 1313IOS7 App Development Essentials ...
相关推荐
gcm-server-repository, 用于Android推送通知的gcm服务器 Maven 库 用于Google-Cloud-Messaging服务器库的 Maven 存储库这允许使用 Maven 管理Google库。 Android SDK提供的gcm-server.jar,由服务器用来向Android...
5. 注销 GCM(Unregistering from GCM):Android 应用注销 GCM 服务。 编写 Android 应用使用 GCM 要使用 GCM 服务,需要在 Android 应用中进行以下操作: 1. 创建清单文件(Creating the Manifest):在 ...
标题中的“android gcm”指的是Android Google Cloud Messaging(GCM),这是谷歌提供的一项服务,允许开发者向Android设备发送消息,通常用于实现应用的通知推送功能。GCM是云到设备(Cloud-to-Device)的消息传递...
Android GCM(Google Cloud Messaging)是谷歌提供的一种用于在服务器和Android设备之间进行实时消息传递的服务。这个"android-GCM开发代码"压缩包显然包含了实现GCM功能的源代码,而不是预编译的jar包,这意味着你...
### Android 推送 GCM详解 #### 一、概述 Google Cloud Messaging for Android(简称GCM)是一项由Google推出的全新推送服务,旨在替代原有的Cloud to Device Messaging(C2DM)。这项服务为开发者提供了从服务器...
**使用GCM实现Android消息推送** 谷歌云消息(Google Cloud Messaging,简称GCM)是谷歌为开发者提供的一种跨平台消息推送服务,允许开发者向Android、iOS甚至Web应用发送消息。在Android开发中,GCM是实现后台消息...
AES GCM(Advanced Encryption Standard Galois/Counter Mode)是一种基于AES(高级加密标准)的块密码模式,用于提供数据的保密性和完整性。在GCM模式下,AES不仅用于加密,还用于生成消息认证码(MAC),从而实现...
在Android开发中,Google Cloud Messaging(GCM)是Google提供的一种免费的服务,允许开发者通过服务器向Android设备发送消息,实现远程消息推送。本教程将详细讲解如何在Android应用中利用GCM实现消息推送,并结合...
5. **多平台支持**:除了Android,GCM还可以与其他平台如iOS、Chrome和Web应用协同工作。 6. **消息类型**:GCM支持多种消息类型,包括普通消息(数据消息)、通知消息以及-collapse_key用于替换先前消息的功能。 ...
在Android系统中,Appropriate AoD(Appropriate for On-Device)是针对设备本地存储安全的一种加密方案,GCM模式在其中扮演了重要角色。下面我们将深入探讨AES-GCM的工作原理、特点以及在Android环境中的应用。 ...
AES-GCM(Advanced Encryption Standard Galois/Counter Mode)是一种基于AES(高级加密标准)的块密码模式,用于提供数据的保密性和完整性。在网络安全和数据保护领域,它被广泛应用于加密通信、存储加密以及安全...
5. **处理消息**:创建一个继承自BroadcastReceiver的类,重写onReceive()方法,用于接收GCM推送的消息。在AndroidManifest.xml中注册这个receiver,并指定intent-filter,包括ACTION_BOOT_COMPLETED以处理设备启动...
《Android GCM客户端详解》 在移动应用开发领域,Android Google Cloud Messaging(GCM)是Google提供的一项服务,用于在Android设备与服务器之间实现高效、可靠的消息传递。本压缩包"android-gcm-client.7z"包含的...
SIV(Synthetic Initialization Vector)则是一个更安全的AEAD(Authenticated Encryption with Associated Data)模式,它能够防止重放攻击,并且对密钥的使用更为安全。 GCM模式结合了CTR(Counter Mode)的高效...
微星945GCM5_v2主板说明书,提供给有需要的童鞋。
Used in combinaton with µg GmsCore to enable Google Cloud Messaging (GCM) and much more. This tutorial describes only the installation process to get GCM working. The also available Google Play Store...
**AES GCM 算法源码解析** AES(Advanced Encryption Standard)是高级加密标准,是一种广泛应用的块密码,以其高效、安全著称。GCM(Galois/Counter Mode)是AES的一种加密模式,它提供了数据加密以及消息认证代码...
### AES128加密算法的GCM工作模式详解 #### 引言 本文档主要介绍了一种名为Galois/Counter Mode(GCM)的高级加密标准(AES)的工作模式。GCM是一种高效的、可认证的加密技术,适用于高速硬件加密场景以及软件实现...