Skip to content

Instantly share code, notes, and snippets.

Working from home

Nick Caballero nickcaballero

Working from home
View GitHub Profile
khernyo / build.gradle
Created Dec 6, 2012
Gradle Android configuration with .so hack
View build.gradle
// This hack works with, won't work in later version without modification
apply plugin: 'android'
targetCompatibility = 1.6
sourceCompatibility = 1.6
android {
target = 'android-14'
marshall /
Created Feb 22, 2011
A reflection hack to override the APK ClassLoader so you can launch Activities in an external JAR.
// !!WARNING: Not recommended for production code!!
public class ClassLoaderActivity extends Activity
public void onCreate(Bundle savedInstanceState)
// file.jar has a dex'd "classes.dex" entry that you can generate with "dx" from any number of JARs or class files
ClassLoader dexLoader = new DexClassLoader("/path/to/file.jar", getCacheDir().getAbsolutePath(), null, getClassLoader());