After update of AS to 1.0, getting “method ID not in [0, 0xffff]: 65536” error in project

The error means you have reached maximum method count in your app. That does include any libraries that you use for your project. There are two ways to tackle the issue: Get rid of any third-party libraries that you don’t really need. If you use google play services that might contribute a lot to the … Read more

Multiple dex files define /BuildConfig, can’t find the cause:

In my case the similar error happened because there were 2 modules with the same package name in AndroidManifest.xml files. Using different package names in the modules solved the problem. Also the same thing happens when a library jar is being included twice (or more times) in several modules, as a dependency. In this case … Read more

Android support multidex library implementation

The Blog was the old solution. With Android Studio 0.9.2 & Gradle Plugin 0.14.1, you only need to: Add to AndroidManifest.xml: . android:name=”android.support.multidex.MultiDexApplication” or Add MultiDex.install(this); in your custom Application’s attachBaseContext method or your custom Application extend MultiDexApplication add multiDexEnabled = true in your build.gradle . android { defaultConfig { … multiDexEnabled = true } … Read more

How to extract code of .apk file which is not working? [duplicate]

Note: All of the following instructions apply universally (aka to all OSes) unless otherwise specified. Prerequsites You will need: A working Java installation A working terminal/command prompt A computer An APK file Steps Step 1: Changing the file extension of the APK file Change the file extension of the .apk file by either adding a … Read more

How to execute the dex file in android with command?

Let’s say you have a the following code in file HelloWorld.java: public class HelloWorld { public static void main(String[] args) { System.out.println(“Hello World!”); } } To run it on an android device: javac HelloWorld.java dx –dex –output=classes.dex HelloWorld.class zip HelloWorld.zip classes.dex adb push HelloWorld.zip /sdcard/ For GB or earlier, you should be able to simply … Read more

How to decompile DEX into Java source code?

It’s easy Get these tools: dex2jar to translate dex files to jar files jd-gui to view the java files in the jar The source code is quite readable as dex2jar makes some optimizations. Procedure: And here’s the procedure on how to decompile: Step 1: Convert classes.dex in test_apk-debug.apk to test_apk-debug_dex2jar.jar d2j-dex2jar.sh -f -o output_jar.jar apk_to_decompile.apk … Read more

What are .dex files in Android?

About the .dex File : One of the most remarkable features of the Dalvik Virtual Machine (the workhorse under the Android system) is that it does not use Java bytecode. Instead, a homegrown format called DEX was introduced and not even the bytecode instructions are the same as Java bytecode instructions. Compiled Android application code … Read more