In your command-line run the following commands:
brew doctor
brew update
In your command-line run the following commands:
brew doctor
brew update
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
#!/bin/bash | |
#this is a small script which updates Android SDK from command line. | |
#Needs to be executed from Android SDK root | |
( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | tools/bin/sdkmanager \ | |
"tools" \ | |
"platform-tools" \ | |
"platforms;android-25" \ | |
"build-tools;25.0.1" \ |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Put this file in the "debug" folder so it only gets merged into debug builds --> | |
<manifest | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
package="org.bookdash.android"> | |
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/> | |
<uses-permission android:name="android.permission.WAKE_LOCK"/> | |
<!-- Disable animations on debug builds so that the animations do not interfere with Espresso |
import android.support.annotation.NonNull; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import java.util.ArrayList; | |
/** |
Based on Microservices presentation by Martin Fowler recorded at GOTO Berlin 2014.
public class RealPathUtil { | |
public static String getRealPath(Context context, Uri fileUri) { | |
String realPath; | |
// SDK < API11 | |
if (Build.VERSION.SDK_INT < 11) { | |
realPath = RealPathUtil.getRealPathFromURI_BelowAPI11(context, fileUri); | |
} | |
// SDK >= 11 && SDK < 19 | |
else if (Build.VERSION.SDK_INT < 19) { |
// Variant 1: For app or library project's build.gradle | |
android { | |
variantFilter { | |
if (it.buildType.name.equals('debug')) { | |
it.ignore = true | |
} | |
} | |
} | |
// Variant 2: For root build.gradle with applying only to library projects |
#!/usr/bin/python | |
# License for any modification to the original (linked below): | |
# ---------------------------------------------------------------------------- | |
# "THE BEER-WARE LICENSE" (Revision 42): | |
# Sebastiano Poggi and Daniele Conti wrote this file. As long as you retain | |
# this notice you can do whatever you want with this stuff. If we meet some day, | |
# and you think this stuff is worth it, you can buy us a beer in return. | |
import argparse, sys, subprocess, tempfile |