G H Prakash
G H Prakash

Reputation: 1857

Failed to collect certificates from...? After trying to install flutter apk

I am trying to run apk file on the device using flutter install. The following error displays

Error: ADB exited with exit code 1
Performing Streamed Install

adb: failed to install F:\...\build\app\outputs\flutter-apk\app.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES:Failed to collect certificates from /data/app/vmdl619719557.tmp/base.apk: Attempt to get length of null array]
Install failed

How can I collect certificates?

Upvotes: 5

Views: 12143

Answers (2)

Poshan Pandey
Poshan Pandey

Reputation: 176

I had the same error and I solved it by adding signing config in app/build.gradle the code looks like below for debug mode:

    buildTypes {
    release {
        signingConfig signingConfigs.debug
    }
}

Upvotes: 14

Sobin Benny
Sobin Benny

Reputation: 221

I had the same error and able to fix it in this way:

  1. uninstall the old application
  2. clean the project
  3. run and reinstall it again

if this not works, try signing the apk.

Upvotes: 2

Related Questions