Android Studio: launch / debug version of application

I added the gradle app for Android, and you can run it from Android Studio. gradlew build produces a debugging and released version (signed, supplemented with proguard).

 buildTypes { debug { zipAlignEnabled true versionNameSuffix "-" + buildDateTime() } release { minifyEnabled true // Eclipse project.properties # proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt' zipAlignEnabled true signingConfig signingConfigs.release versionNameSuffix "-" + buildDateTime() } 

But when I adb install on the device the version crashes at startup.

How to run / debug an application version from Android Studio to find the exact location of the problem?

Or can I debug a manually released signed apk in Eclipse?

+6
source share
2 answers

A window called β€œBuild Options” will appear in which you can choose which version you want to install on the emulator / device.

enter image description here

You must also add debuggable true to your version of the assembly in order to be able to debug it.

+20
source

If you are using version 0.14.0 or higher of the gradle plugin, you must replace "runProguard" with " minifyEnabled " in > build.gradle .

  minifyEnabled false 

minifyEnabled false Values ​​like Build Build cannot be basic or orroidTest (this is forced by the plugin) and that they must be unique to each other.

+1
source

Source: https://habr.com/ru/post/983734/


All Articles