Android Question App not installed problem

Discussion in 'Android Questions' started by doncx, Jun 21, 2019.

  1. doncx

    doncx Member Licensed User

    I've committed the cardinal error of changing multiple things at once. Now it's tough to troubleshoot.

    I've moved to a new computer. When I did that I moved the c:\b4a folder over, the c:\android folder over, and my project folder, named ODD.

    I put the project folder in a new place, under 'documents'

    I installed the jdk v8 and set the path here: C:\Program Files\Java\jdk1.8.0_211\bin\javac.exe

    Then I updated b4a from v8.5 to v9.0.12

    When I ran b4a Bridge (v 2.55) it wouldn't install the compiled app. It failed with the message "app not installed". I've since determined this failure has nothing to do with b4a Bridge. I just can't update my app.

    I then questioned whether the sdk files were up to snuff, so I reinstalled the SDK from the "ready to run" zip supplied by Erel late last year (thanks for the tip, Erel). Nope - that didn't do it.

    I did update the android jar path to C:\android\platforms\android-28\android.jar (from 27)

    Worth noting that I use the infamous old "debug.keystore". However, I've brought the old one (November, 2010) to the new computer (c:\b4a) and also set the key to "use debug key" under "private sign key". This app is under *very* limited private distribution. I would change the key if I could, but it's not a simple distribution.

    I can't figure it out. "App not installed" is a very generic message.

    Clean installs are perfect. Just not installs over older versions.

    What has gone wrong? I'd appreciate any insights you may have.

    Thanks,

    - Don
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You cannot change the key without uninstalling the previous app.

    Worth installing the app with USB debug mode instead of B4A-Bridge. It will give you more information about the problem.
     
  3. doncx

    doncx Member Licensed User

    Ok, I did that and receive the error "Existing application is installed with a different certificate". A search of this forum shows no android hits for that message.

    Is this a reference to the debug (or other) keystore? I thought I had brought that over and used it. How can I tell what the "certificates" are?

    I can still install successfully from my old computer. There are some code updates on the new machine/b4a version but nothing requiring new permissions.

    Where should I look now?

    Thanks
    b4a-cert-error.jpg
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    This means that you are not using the same signing key as before.
     
  5. doncx

    doncx Member Licensed User

    Ok, that seems logical. I thought I was using the debug key and had successfully transferred it to my new computer.

    How do I find out what the previous key was? How do I transfer it to the new computer?

    Thanks
     
  6. DonManfred

    DonManfred Expert Licensed User

    copy the file from pc 1 to pc 2 and configure the ide to use it
    YOU must know. We can not guess what you did defined here in the past (and where you stored the keystore).
     
  7. doncx

    doncx Member Licensed User

    Please see image attached - both versions (both computers) are using the "debug keystore".

    Both computers (both versions) have the file debug.keystore in the b4a program directory. The files are identical as reported by a diff program and are the same size and date (11/25/2010).

    I can't install a 9,0 compile over an 8.5 compile from the previous computer.

    So, yes, I have confirmed what keystore is being used. It's not working.

    Where should I look next? Could this be related to a different Java version?

    I appreciate your assistance. I'm stuck.
     

    Attached Files:

  8. Erel

    Erel Administrator Staff Member Licensed User

    I don't think so.

    Unzip the APK file and look for a file with a DSA extension, under the META-INF.
    Is the file name the same in both APKs?

    You can run this command to get information about the signing key:
    Code:
    <java bin>\keytool -printcert -file B4A.DSA
     
  9. doncx

    doncx Member Licensed User

    Thank you, Erel. The DSA files were very different. That pointed me in the right direction. Problem solved. I thought b4a was running in c:\b4a, where I had copied my old version over which I'd intended to install the upgrade to v9. However, likely due to my own inattention, the new version installed to c:\Program Files (x86). I copied the old debug.keystore to the wrong folder.

    Many thanks for your assistance.
     
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice