NativeScript / NativeScript/android-dts-generator

Updating definitions to arbitrary android sdk version

Open
#21 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
96
Forks
25
PR merge metrics
No merged PRs in 30d

Description

I'm trying to update my tns-platform-declarations to use the latest android sdk.

I've generated the definitions for the respective sdks and replaced the include in tns-platform-declarations/android/android.d.ts to use the generated file (currently android23.d.ts).

Problem is I now get - among others, including a lot of duplicate identifiers - a million error TS2503: Cannot find namespace 'native'., which tells me not everything has been extracted. Where do I go from here? The sdk declaration files have wildly differing sizes:

-rw-rw-r-- 1 yule yule 13777754 Apr 25 13:17 android17.d.ts # Original file
-rw-rw-r-- 1 yule yule  4686196 Apr 25 14:20 android20.d.ts
-rw-rw-r-- 1 yule yule  5191200 Apr 25 14:20 android21.d.ts
-rw-rw-r-- 1 yule yule  5214515 Apr 25 14:20 android22.d.ts
-rw-rw-r-- 1 yule yule  5006948 Apr 25 14:20 android23.d.ts
-rw-rw-r-- 1 yule yule 17178798 Apr 25 14:19 android24.d.ts
-rw-rw-r-- 1 yule yule  5730638 Apr 25 13:17 android25.d.ts

Which tells me I'm probably doing something wrong.

Do I have to include anything else?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tns-platform-declarations/android/android.d.ts and compare the generated android23.d.ts against the original android17.d.ts, focusing on the missing native namespace and duplicate identifiers reported by TypeScript. Re-run generation for the listed SDK versions and determine whether the resulting declarations compile without those errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, typescript
Domain
mobile-dev, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.