INSTALL_FAILED_INVALID_APK error with version 1 debug code incompatible with 0
I have created an Android app on Android Studio version 2.3.3. When I try to deploy an app on a phone (lennovo) or emulator (GenyMotion), I get an error:
INSTALL_FAILED_INVALID_APK: /data/app/vmdl235652946.tmp/4_yCommerceApp-b_c-dev-debug version code 1 inconsistent with 0.
I have looked at various posts here and tried the approaches below, none of which seem to help
-
Was there a clean build followed by a restore after restarting Android Studio
-
Disconnected and reconnected devices
-
I deleted directories
.idea
,.gradle
and build and build again
Any suggestions on how to solve this problem? What is the version code referenced here? I see one version code in AndroidManifest.xml like below:
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1"
android:versionName="1.0">
I don't see any other version code yet. BTW, I haven't used an Android emulator as they seem to take hours to get started. My processor is AMD, not Intel. I have ARM images loaded for emulators.
source to share