RSS

Monthly Archives: March 2016

Android Studio : Upgrading Gradle and Its Plugin

Android Studio : Upgrading Gradle and Its Plugin

androidstudiohero

Hey there, you might have caught in error message in Android Studio. Here, it says

Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to “XXXX”

Here, it also stops working. This starts giving pain and delays your work. Tackling this is simple if you know how to do it. So, here we are ->

1. Upgrading Gradle

Go to gradle-wrapper.properties and change

distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-bin.zip

Refer this link always before changing to get latest or which version you need. The change you need to perform is change underlined part only by the new one. So, this update may also need new plugin.

After this you must clean and rebuild the project.

2. Upgrading Gradle Plugin

Go to build.gradle and perform a change in

classpath ‘com.android.tools.build:gradle:2.1.0-alpha3

Refer this link to find out newest versions of Gradle plugin. Now change the underlined part as  you need them. After this you must clean and rebuild the project.

3. Solving the error without updating gradle and its plugin

You may need set an environment variable with the specified value. On OSX this looks as follows:

launchctl setenv ANDROID_DAILY_OVERRIDE <your-value-on-error-message>

Afterwards, clean the project, restart AS, and build again.

 

 
Leave a comment

Posted by on March 26, 2016 in Android, tech geak

 

Tags: , , , , , ,

How do I Create a Self-Signed Certificate for an Android App?

How do I Create a Self-Signed Certificate for an Android App?

Introduction

The Android release system requires that all applications installed on user devices are digitally signed with certificates whose private keys are held by the developer of the applications. The certificates allow the Android system to identify the author of an application and establish trust relationships between developers and their applications. The certificates are not used to control which applications the user can and cannot install.

Locating Keytool

Keytool is a key generation application that is made available through your Java SDK installation. You should be able to access the tool using a Terminal on your Mac or through the Command Prompt on your Windows machine.

The location of keytool is included in the directory search path on standard Mac installations but may have to be configured on Windows machines.

You can typically find the keytool application in the following or similar location under windows: C:\Program Files\Java\jdk1.6.0_24\bin\, if you followed the default installation process. You can either run keytool.exe from this location or add the relevant path to your search paths.

To add the path to your existing search paths, open your Control Panel and navigate to System and Security -> System -> Advanced system settings. This opens the System Properties window with the Advanced tab. Select Environment Variables… to open the Environment Variables window. Then select Path from the System variables panel and selectEdit… . This opens the Edit System Variable dialog in which you can add the new path to the existing list of search paths. Make sure that you separate each new path with a semicolon, as is shown in the figure of this step.

Creating the Key

media_1305634695518_display

Open your Terminal or Command Prompt and execute the command keytool. If the application is found, it is executed and a list of the available command line options is returned. This provides you with information on how you can configure the key generation process. The following example should allow you to generate an appropriate key:

keytool.exe -genkey -v -keystore release.keystore -alias TicTacToe -keyalg RSA -keysize 2048 -validity 10000

The application is interactive and command line driven, requesting that you enter a number of parameters. Do not worry if you make mistakes when entering parameters, you can enter them again.

Once you have created your key, it is stored in a .keystore file with its location shown at the end of the output, generated by the keytool. You should make a copy of your .keystore and keep it and the passwords in a safe place.

Note: -alias TicTacToe is specific to an application that is being signed to your application. You may want to change this to something that is more meaningful to the application you are working on.

Note: The Android website: http://developer.android.com/guide/publishing/app-signing.html has a lot of information and recommendations on how to create your private key. It is strongly recommended that you review that information in addition to what is covered in this lesson.

………………………………………………………………………………………………………….Source

 
Leave a comment

Posted by on March 2, 2016 in Android, tech geak

 

Tags: , , , ,

 
%d bloggers like this: