Reputation: 49
Have these erro when i'm trying to build the apk to some devices. Have no idea whats going on.
I get that when i build and install apk on device at the first time.
Someone have some tips for that?
[[EDIT]]
Well, after creating a debug key on keystore, i can build and deploy the apk via ADP to the device. But, dont know why, the error just return...
And now, we have other error:
UPDATE:
I Fix that issue removing all Android SDK and Android Studio and ReInstall it.
Upvotes: 2
Views: 16331
Reputation: 21
The problem is most likely because of your ADB location. You can solve this by toggling the automatic ADB location and choosing the ADB location itself manually
Steps:-
Upvotes: 0
Reputation: 1148
This error can also occur if you recently switched branch which had different build variants declared in build.gradle
file and you didn't perform gradle sync.
For example you had release
and debug
and then you switched to branch which has releas
, deubg
and staging
variants; your project will still build but while installing apk this error can pop up.
Upvotes: 0
Reputation: 346
The reason is you are trying to install the application with the same package name. If you have already downloaded the same application from the play store /app market, then simply uninstall that application and RE-RUN.
Upvotes: 1
Reputation: 1119
The problem can be solved by addding the install flags -r -t in the Run/Debug Configuration Dialog like it's showed in the given image
You can find Run/Debug Configuration Dialog location here according to Jetbrains.
UPDATE: Depending on the Android Studio version the Run/Debug Configuration position in the IDE can be slightly different, but always refer Jetbrains to find whatever you are looking for
Upvotes: 8
Reputation: 4272
When you've installed an APK from another source, Android Studio warns you before overwriting.
For example, if I've developed an application, uploaded it onto the Google Play Store, downloaded it, then try to re-deploy that same application from Android Studio, I'll get this warning.
It's trying to tell you that the way the package is signed is different; it's warning you that another app might be masquerading as the original.
Upvotes: 2