Could not find com.android.tools.build:gradle:2.2.0 -here is the solution

In case You had problem with:

Error:Could not find com.android.tools.build:gradle:2.2.0.
Searched in the following locations:
    https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom
    https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.jar
Required by:
    :YOUR_PROJECT:unspecified

Don’t forget modify root build.gradle and add

jcenter()

It would look like this:

buildscript {
    repositories {

jcenter()

        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.0'
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

allprojects {
    repositories {
        mavenCentral()
    }
}

List url of utils worth to use during developing android

Immediately Invoked Functions-JSFiddle
http://jsfiddle.net/

Remove Duplicate Lines
http://textmechanic.com/Remove-Duplicate-Lines.html

Codota-Find great android API usage examples
http://android.codota.com/

CC Search
http://search.creativecommons.org/

Google Translate
http://translate.google.com/

Online XML entity decoder|Coder’s Toolbox
http://coderstoolbox.net/string/#!encoding=xml&action=decode&charset=us_ascii

RegExr:Learn,Build,&Test RegEx
http://www.regexr.com/

Epoch Converter-Unix Timestamp Converter
http://www.epochconverter.com/

Time zone list/Epoch to time zone converter(epoch 1466578800)
http://www.epochconverter.com/timezones?q=1466578800&tz=Europe%2FWarsaw

SQL Fiddle
http://sqlfiddle.com/

DiffNow-Compare files online.Powered by ExamDiff Pro.
http://www.diffnow.com/

Android Layout Finder|Buzzing Android
https://www.buzzingandroid.com/tools/android-layout-finder/

JSONLint-The JSON Validator.
http://jsonlint.com/

Flat Icon Maker-FlatIcons
http://flaticons.net/

Sort Text Lines
http://textmechanic.com/Sort-Text-Lines.html

URL Decoder/Encoder
http://meyerweb.com/eric/tools/dencoder/

Color – Style – Google design guidelines
https://material.google.com/style/color.html#

Material icons – Google Design
https://design.google.com/icons/

Change time in genymotion emulator – simple java app

I made app in executable jar java file for setting time in genymotion emulator.

Here is simple java code and compiled app for setting time in genymotion app. Below code I showed how the app looks like and also added ready jar app to download.

Code:

public class SetTimeInGenyMotion {
private JTextField textField1;
private JButton getTimeInProperButton;
private JButton setTimeInProperButton;
private JButton getTimeAndSetButton;
private JPanel panel1;
public static final String FORMAT = "YYYYMMDD.HHmmss";

public static void main(String[] args) {
new SetTimeInGenyMotion().doStuff();
}

private void doStuff() {

getTimeInProperButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
textField1.setText(getTime());
}
});

setTimeInProperButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String time = textField1.getText();
setTime(time);
}
});

getTimeAndSetButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String time = getTime();
setTime(time);
textField1.setText(time);
}
});

showWindow();
}

private void showWindow() {
JFrame frame = new JFrame("SetTimeInGenyMotion");
frame.setContentPane(panel1);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setMinimumSize(new Dimension(680, 0));
frame.pack();
frame.setVisible(true);
}

private void setTime(String time) {
try {
String command = "adb shell date -s " + time;

Runtime rt = Runtime.getRuntime();
Process pr = rt.exec(command);
BufferedReader br = new BufferedReader(new InputStreamReader(pr.getErrorStream(), "UTF-8"));
String l = "";

while ((l = br.readLine()) != null) {
System.out.println(l);
}
br.close();

} catch (IOException e1) {
e1.printStackTrace();
}
}

private String getTime() {
//adb shell date -s YYYYMMDD.HHmmss
//http://stackoverflow.com/questions/7094772/how-to-set-android-device-date-time-programmatically

String format = "YYYYMMdd.HHmmss";
Calendar instance = Calendar.getInstance();
String time = getDate(instance.getTimeInMillis(), format);
return time;
}

public static String getDate(long milliSeconds, String dateFormat) {
// Create a DateFormatter object for displaying date in specified format.
SimpleDateFormat formatter = new SimpleDateFormat(dateFormat);
// Create a calendar object that will convert the date and time value in milliseconds to date.
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(milliSeconds);
return formatter.format(calendar.getTime());
}
}

Pic:
Zrzut ekranu 2015-06-03 11.58.59

Download:
download