

ProGuard looks at the entry points of your app and maps out the code that the app can reach. Setting minifyEnabled to true enables ProGuard. ProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' Enabling ProGuardĮnabling ProGuard is simple! In the adle file for the app module, replace the buildTypes code with the following:

ProGuard will do its job to remove all the code that is not accessed by the app. You’ll notice adding the dependency added a few megabytes to the APK file without even writing any code! You won’t be using every part of this library – this is where ProGuard comes in. Once finished, run the APK Analyzer again. Perform a Gradle sync, then select Build ▸ Make Project. Open the adle file for the app module and add the following to the list of dependencies: implementation ':Bubble-Picker:v0.2.4' Sometimes it’s done for fun, but often reverse engineering is done for theft of intellectual property or app cloning. Some of these tools help reverse engineers decompile the app back to its original code. Note: There are many other tools that engineers use to analyze apps, such as JD-GUI, APKTool, and Jadx. You’ll use this tool several more times in this tutorial. Select the app-debug.apk file and click OK to open the APK Analyzer. If necessary, navigate to the debug folder SlothSanctuary-Starter/app/build/outputs/apk/debug. It will open a dialog for your filesystem.

Launch the analyzer by selecting Build ▸ Analyze APK. You can see what’s taking up the most space, as well as the total method and reference counts. It presents a view with a breakdown of your app’s file size. The APK Analyzer is a tool for inspecting your finalized app and what contributes to it’s size. You’ll want to check your app size along the way. It presents items that float around the screen in bubbles. You’ll make it more exciting by adding the BubblePicker library. Right now there’s a simple screen that lists the six species of sloths. Open the starter project in Android Studio 3.1.4 or greater, then build and run to see the app you’ll be working with. Getting Startedĭownload and unzip the materials for this tutorial using the Download Materials button at the top or bottom of this page. If Android development is new to you, first read through our Beginning Android Development and Kotlin for Android tutorials. Note: This tutorial assumes that you’re already familiar with the basics of Android development and Android Studio.
