How to install application in android device using android studio.i had may try but i can't find solution as i want so please help me,please see below screen shots
Waiting for device.
Target device: xiaomi-mi_3w-13d8da8
Uploading file
local path: E:\Mahesh\Android\StudioWorkspace\Test\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/com.test
Installing com.test
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.test"
pkg: /data/local/tmp/com.test
Failure [INSTALL_FAILED_DEXOPT]
Thank you in advance
The error clearly states that you need to remove installed application from your device and install it again. If it doesn't work, try to enable proguard for your release/debug builds:
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
You need to add this code into the build.gradle file, inside the section called android. More info on Gradle in Android Studio can be found here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With