NativeScript / NativeScript/nativescript-cli
Passing compile sdk lower than 28 fails build with tns-android@next
Personne n'a encore pris cette issue.
- Langage dominant
- JavaScript
- Étoiles
- 1.1k
- Forks
- 204
- Merge moyen
- 1 j 9 h
- PR mergées (30 j)
- 8
Description
CLI: 5.0.0-2018-10-16-12488 (RC)
Android Runtime: 5.0.0-2018-10-23-165909-01
The new android runtime requires sdk 28. If you build such project with tns build --compileSdk 27 the build will fail with error for missing resources. We need a check in that case and warning that you cannot build project with last android runtime with sdk lower than 28.
Steps:
- tns create TestApp --js
- tns platform add android@next
- tns build android --compileSdk 27
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':app:processDebugResources'.
Android resource linking failed
Output: D:\work\TestProjects\test3\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
D:\work\TestProjects\test3\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
D:\work\TestProjects\test3\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1153: error: resource android:attr/fontVariationSettings not found.
D:\work\TestProjects\test3\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1154: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\endarova.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\0925c6411c9bd9ae001a8948b7174069\aapt2-3.2.0-4818971-windows\aapt2.exe link -I
C:\Users\endarova\AppData\Local\Android\Sdk\platforms\android-27\android.jar --manifest\ D:\work\TestProjects\test3\platforms\android\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml-o\ D:\work\TestProjects\test3\platforms\android\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\ -R\ @D:\work\TestProjects\test3\platforms\android\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
--auto-add-overlay\ --java\ D:\work\TestProjects\test3\platforms\android\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\ --custom-package\ org.nativescript.test3-0\apk--no-version-vectors
--output-text-symbols
D:\work\TestProjects\test3\platforms\android\app\build\intermediates\symbols\debug\R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0
Output: C:\Users\endarova.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\6a6559d0a9305ecc5ded117112c3f7db\res\values-v28\values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
D:\work\TestProjects\test3\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.
C:\Users\endarova.gradle\caches\transforms-1\files-1.1\design-28.0.0.aar\c1e5d15a6b9134a1e23aed70d9b09c4b\res\values\values.xml:161:5-202: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\endarova.gradle\caches\transforms-1\files-1.1\design-28.0.0.aar\c1e5d15a6b9134a1e23aed70d9b09c4b\res\values\values.xml:161:5-202: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\endarova.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\0925c6411c9bd9ae001a8948b7174069\aapt2-3.2.0-4818971-windows\aapt2.exe link -I
C:\Users\endarova\AppData\Local\Android\Sdk\platforms\android-27\android.jar
--manifest
D:\work\TestProjects\test3\platforms\android\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml-o\ D:\work\TestProjects\test3\platforms\android\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\ -R\ @D:\work\TestProjects\test3\platforms\android\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt--auto-add-overlay--java\ D:\work\TestProjects\test3\platforms\android\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r--custom-package org.nativescript.test3-0\apk
--no-version-vectors
--output-text-symbols
D:\work\TestProjects\test3\platforms\android\app\build\intermediates\symbols\debug\R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par reproduire tns build android --compileSdk 27 après avoir créé une application et ajouté android@next, puis suivez le traitement de --compileSdk par la CLI. Le travail est terminé lorsque la combinaison incompatible SDK/Runtime est détectée et génère un avertissement, au lieu d’échouer plus tard en raison de ressources Android manquantes.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- android, javascript
- Domaine
- build-system, cli, mobile-dev
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100