NativeScript / NativeScript/nativescript-cli
Multiple flavors in Android project: no way to specify which APK to run after build
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 1.1k
- Forks
- 204
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 8
Beschreibung
Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo?
yes.
Tell us about the problem
When specifying multiple flavors in the app.gradle and thus more than one APK gets generated during build, the CLI prints a warning More than one .apk found in ... directory. Using the last one produced from build.
So depending on Gradle's internal workings when doing a tns run android the APK that was built first is picked. Which may not be the right one in this case.
Would be great if the CLI would have an option to specify which flavor (or APK) to be used on tns run
Which platform(s) does your issue occur on?
macOS, Android build
Please provide the following version numbers that your issue occurs with:
- CLI: 4.0.0
- Cross-platform modules: tns-core-modules 4.0.1
- Runtime(s): tns-androd 4.0.1
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne in lib/services/platform-service.ts bei der verknüpften APK-Auswahllogik und überprüfe, wie tns run android mit mehreren APKs umgeht, die aus app.gradle-Flavors erzeugt werden. Definiere die CLI-Option und ihr erwartetes Flavor- oder APK-Auswahlverhalten und verifiziere anschließend, dass tns run android konsistent die angeforderte APK startet, statt sich auf die Build-Reihenfolge zu verlassen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- android, javascript
- Bereich
- cli, mobile
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100