NativeScript / NativeScript/nativescript-cli

Error is: The parser encountered some structural problem in the manifest.

Aperta
#5,639 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug-pending-triage
Lingua principale
JavaScript
Stelle
1.1k
Fork
204
Merge medio
1g 9h
PR unite (30g)
8

Descrizione

Issue Description

Run the app with ns run android

You ll get a cryptic error at the end

Unable to apply changes on device: emulator-5554. Error is: The parser encountered some structural problem in the manifest..

The log below shows the actual error which should be brought back up to the user:

INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1130854405.tmp/base.apk (at Binary XML file line #30): com.tns.NativeScriptActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present
Reproduction

Run an app with a manifest not ready for android S

Relevant log output (if applicable)
d/app/build/outputs/apk/debug/app-debug.apk"
Result when throw error is false:
{
  stdout: 'Performing Streamed Install\n',
  stderr: 'adb: failed to install /Volumes/dev/nativescript/nativescript-material-components/demo-vue/platforms/android/app/build/outputs/apk/debug/app-debug.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1130854405.tmp/base.apk (at Binary XML file line #30): com.tns.NativeScriptActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]\n',
  exitCode: 1
}
Error name: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED result code: -108
The parser encountered some structural problem in the manifest.
Unable to apply changes on device: emulator-5554. Error is: The parser encountered some structural problem in the manifest..
Environment
npm ERR! cb.apply is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     /Volumes/data/mguillon/.npm/_logs/2022-03-02T20_01_11_386Z-debug.log
Install for [ 'nativescript-envinfo@latest' ] failed with code 1
Please accept these terms

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Eseguire il comando segnalato ns run android con un manifest che non è ancora pronto per Android S e confrontare l’output della CLI con l’adb stderr mostrato nell’issue. Tracciare il punto in cui il risultato INSTALL_PARSE_FAILED_MANIFEST_MALFORMED viene convertito nel messaggio generico del parser; il lavoro è completato quando l’errore di installazione Android utile per intervenire viene mostrato all’utente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
android, javascript
Ambito
cli, mobile
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.