Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Package com.example.helloworld signatures do not match previously installed version #1479

Closed
ItsCubeTime opened this issue Oct 6, 2023 · 1 comment
Labels
android The issue relates to Android mobile support. bug A crash or error in behavior.

Comments

@ItsCubeTime
Copy link

ItsCubeTime commented Oct 6, 2023

Describe the bug

Not sure if this is more of a feature request than a bug, but it would be neat if briefcase could identify:

           >>> Running Command:                                                                                                                                    subprocess.py:706
           >>>     'C:\Users\olliv\AppData\Local\Android\Sdk\platform-tools\adb.exe' -s R58M82J1S4T install -r                                                     subprocess.py:707
           'C:\Users\olliv\Desktop\togaTestAndroid10-6-2023\helloworld\build\helloworld\android\gradle\app\build\outputs\apk\debug\app-debug.apk'                                   
           >>> Working Directory:                                                                                                                                  subprocess.py:714
           >>>     C:\Users\olliv\Desktop\togaTestAndroid10-6-2023\helloworld                                                                                      subprocess.py:715
[14:12:37] >>> Command Output:                                                                                                                                     subprocess.py:731
           >>>     adb: failed to install                                                                                                                          subprocess.py:733
           C:\Users\olliv\Desktop\togaTestAndroid10-6-2023\helloworld\build\helloworld\android\gradle\app\build\outputs\apk\debug\app-debug.apk: Failure                            
           [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.example.helloworld signatures do not match previously installed version; ignoring!]                                     
           >>>     Performing Streamed Install                                                                                                                     subprocess.py:733
           >>> Return code: 1                    

And prompt you as a user if you want to briefcase to uninstall the existing com.example.helloworld package with adb uninstall com.example.helloworld . If someone feels like picking this up, please also add a cmd line flag that lets you handle this automatically, like --forceUninstallPreviousPackage .

briefcase run android

*************************************************************************
** WARNING: JAVA_HOME does not point to a JDK                          **
*************************************************************************

    The location pointed to by the JAVA_HOME environment variable:

    C:\Program Files\Android\Android Studio\jre

    does not appear to be a JDK. It may be a Java Runtime Environment.

    Briefcase will use its own JDK instance.

*************************************************************************

Select device:

  1) SM A405FN (R58M82J1S4T)
  2) Create a new Android emulator

> 1

In future, you can specify this device by running:

    $ briefcase run android -d R58M82J1S4T

[helloworld] Starting app on SM A405FN (R58M82J1S4T) (device ID R58M82J1S4T)

[helloworld] Installing app...
Stopping old versions of the app... done
Installing new app version...
                                                                                                                                                                 
Unable to install APK C:\Users\olliv\Desktop\togaTestAndroid10-6-2023\helloworld\build\helloworld\android\gradle\app\build\outputs\apk\debug\app-debug.apk on R58M82J1S4T

Log saved to C:\Users\olliv\Desktop\togaTestAndroid10-6-2023\helloworld\logs\briefcase.2023_10_06-14_12_37.run.log

Steps to reproduce

I'm actually not sure how to reproduce this, but this is the full briefcase log file where I found error in above snippet:
briefcase.2023_10_06-14_12_37.run.log

Expected behavior

See bug description

Screenshots

No response

Environment

Briefcase: 0.3.15

Logs

No response

Additional context

No response

@ItsCubeTime ItsCubeTime added the bug A crash or error in behavior. label Oct 6, 2023
@rmartin16
Copy link
Member

Thank you for reporting this; although, it does appear to be a duplicate of #1362. Please add any additional relevant thoughts/ideas there.

@rmartin16 rmartin16 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2023
@rmartin16 rmartin16 added the android The issue relates to Android mobile support. label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android The issue relates to Android mobile support. bug A crash or error in behavior.
Projects
None yet
Development

No branches or pull requests

2 participants