Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@codeguru42
codeguru42 / gist:64d284f54a7dd7bceea2
Last active August 29, 2015 14:22
./gradlew :android:dependencies
_premiumDebugCompile - ## Internal use, do not manually configure ##
+--- com.android.support:appcompat-v7:22.2.0
| \--- com.android.support:support-v4:22.2.0
| \--- com.android.support:support-annotations:22.2.0
androidTestCompile - Classpath for compiling the androidTest sources.
+--- com.android.support.test:runner:0.2
| +--- junit:junit-dep:4.10
| | \--- org.hamcrest:hamcrest-core:1.1
| +--- com.android.support.test:exposed-instrumentation-api-publish:0.2
@codeguru42
codeguru42 / build.gradle
Created June 2, 2015 12:59
Gradle dependencies
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:support-v4:22.2.0'
compile 'com.google.android.gms:play-services:6.1.71'
compile 'com.crashlytics.android:crashlytics:1.+'
compile 'com.jakewharton:butterknife:5.1.2'
liteCompile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.2.1'
androidTestCompile ('com.squareup:fest-android:1.0.8') {
package codeguru.labelededittext;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
CheckBox mCheckable;
public interface OnCheckListener extends OnClickListener {
}
public void setOnCheckListener(OnCheckListener listener) {
mCheckable.setOnClickListener(listener);
}
package atmos.tool2d;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Pixmap.Format;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
$ gradle robolectricTest
FAILURE: Build failed with an exception.
* Where:
Build file '/home/layne/dev/src/java/android/WADBCE/build.gradle' line: 5
* What went wrong:
A problem occurred evaluating root project 'WADBCE'.
> Could not find method jcenter() for arguments [] on repository container.
@codeguru42
codeguru42 / postVideoData.java
Last active August 29, 2015 14:04
postVideoData
@RequestMapping(method = RequestMethod.POST, value = "/video/{id}/data")
public Video postVideoData(@PathVariable("id") int videoId,
@RequestParam("data") MultipartFile videoData) throws IOException {
Video video = videos.get(videoId);
InputStream in = videoData.getInputStream();
manager.saveVideoData(video, in);
return video;
}
java.lang.RuntimeException
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2565)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2594)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1198)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4586)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
@codeguru42
codeguru42 / testBackup.sh
Created June 15, 2014 03:23
Test Backup
#!/bin/bash
#verify command-line args
package = $1
apk = $2
adb install ${apk}
adb shell bmgr enable true
adb push bbct.db /data/data/${package}/databases
com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException
at com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:82)
at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:112)
at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:42)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)