Skip to content

Instantly share code, notes, and snippets.

@skyisle
skyisle / gist:97d9e6fa607c99010430
Created March 13, 2015 02:47
junit test + retrolambda build error
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:generateDebugBuildConfig
:app:generateDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:validateDebugSigning
apply plugin: 'android'
repositories {
jcenter()
mavenCentral()
maven {
name 'maven.aviary.com'
url uri("http://maven.aviary.com/repo/release")
}
}
@skyisle
skyisle / gist:c9e5b0a43a4b4313ac19
Created July 25, 2014 07:23
espresso static import
import static com.google.android.apps.common.testing.ui.espresso.Espresso.onData;
import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView;
import static com.google.android.apps.common.testing.ui.espresso.Espresso.pressBack;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.closeSoftKeyboard;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.typeText;
import static com.google.android.apps.common.testing.ui.espresso.assertion.ViewAssertions.matches;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withText;
SupportMenuInflater W Ignoring attribute 'actionProviderClass'. Action view already specified.
W Cannot instantiate class: android.support.v7.app.MediaRouteButton
W java.lang.ClassNotFoundException: Didn't find class "android.support.v7.app.MediaRouteButton" on path: /system/framework/com.google.android.maps.jar:/data/app/com.google.android.
apps.plus-1.apk
W at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
W at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
W at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
W at lk.a(PG:480)
W at lk.a(PG:441)
W at li.a(PG:196)
@skyisle
skyisle / build.gradle
Last active December 21, 2016 07:41
Default build.gradle explained
buildscript {
// android 빌드를 하기위해 플러그인 자체을 가져오기 위한 설정입니다.
repositories {
mavenCentral()
}
// plugin 자체는 maven 중앙 저장소를 통해 배포됩니다.( http://search.maven.org/ )
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
// android plugin 버전 0.6.+ 를 사용합니다. 배포된 버전중 +로 표시된 부분의 숫자가 가장 큰 버전이 사용됩니다.
@skyisle
skyisle / build.gradle
Last active December 29, 2015 14:39
Default build.gradle file
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
}
apply plugin: 'android'
# Copyright (C) 2012 The Android Open Source Project
#
# IMPORTANT: Do not create world writable files or directories.
# This is a common source of Android security bugs.
#
import /init.${ro.hardware}.rc
import /init.usb.rc
import /init.trace.rc
@skyisle
skyisle / build.gradle
Last active December 23, 2015 14:39
get versionCode from manifest
def getVersionCodeFromManifest() {
def manifestContent = file(android.sourceSets.main.manifest.srcFile).getText()
def matcher = (~"versionCode=\"(\\d+)\"").matcher(manifestContent)
matcher.find()
return Integer.parseInt(matcher.group(1))
}
def getVersionCodeFromManifestLong() {
def manifestFile = android.sourceSets.main.manifest.srcFile
def xpath = XPathFactory.newInstance().newXPath()
/*
* Copyright 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@skyisle
skyisle / build.gradle
Last active December 19, 2015 23:49
Using annotation processing in gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'