Skip to content
New issue

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

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

Already on GitHub? # to your account

Unable to install APK produced by Capacitor #6714

Closed
Fanman03 opened this issue Jul 6, 2023 · 3 comments
Closed

Unable to install APK produced by Capacitor #6714

Fanman03 opened this issue Jul 6, 2023 · 3 comments

Comments

@Fanman03
Copy link

Fanman03 commented Jul 6, 2023

Bug Report

Capacitor Version

Latest Dependencies:

  @capacitor/cli: 5.1.1
  @capacitor/core: 5.1.1
  @capacitor/android: 5.1.1
  @capacitor/ios: 5.1.1

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/cli: 5.1.1
  @capacitor/android: 5.1.1
  @capacitor/core: 5.1.1

Platform(s)

Android

Current Behavior

When attempting to install an apk produced by Capacitor via adb, I am recieving the following error:
adb: failed to install app-release-signed.apk: Failure [-124: Failed parse during installPackageLI: Targeting R+ (version 30 and above) requires the resources.arsc of installed APKs to be stored uncompressed and aligned on a 4-byte boundary]

The apk file was built by selecting Project -> Prepare Release in the Visual Studio Code extension.

Expected Behavior

The application should install, as it does on the Android Studio emulator.

Code Reproduction

Here is my capacitor.config.json file for reference:

  "appId": "com.fanman03.camviewerplusclient",
  "appName": "CamViewerPlus Client",
  "bundledWebRuntime": false,
  "webDir": "dist",
  "plugins": {
    "SplashScreen": {
      "launchShowDuration": 0
    }
  },
  "server": {
    "androidScheme": "https"
  }
}

npm --version output:
8.19.2
node --version output:
v18.16.0
pod --version output (iOS issues only):

@ionitron-bot ionitron-bot bot added the triage label Jul 6, 2023
@ionitron-bot ionitron-bot bot removed the triage label Jul 6, 2023
@Fanman03 Fanman03 changed the title bug: Unable to install APK produced by Capacitor Jul 6, 2023
@jcesarmobile
Copy link
Member

If you are building from the vs code extension, it looks like a problem with the vs code extension, not with Capacitor, you should report it there.

It's probably using jarsigner instead of apksigner
#6284

@jcesarmobile jcesarmobile closed this as not planned Won't fix, can't repro, duplicate, stale Jul 6, 2023
@1e4
Copy link

1e4 commented Jul 11, 2023

@Fanman03 Did you get this solved? I'm coming across the same issue even when using cli

@ionitron-bot
Copy link

ionitron-bot bot commented Aug 10, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Aug 10, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

4 participants