Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Importing dependencies for a .jar file

未关闭
#8 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
30/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞

调研方向

首先使用 bolts-tasks-1.4.0.jar、android.jar 和 OneSignalSDK.jar 重现文档中的命令,并记录依赖项查找失败的位置。跟踪 dts-generator.jar 对重复 -input 参数的命令行处理,并将完成定义为解析所需的类,而无需手动添加每个依赖项 jar。

由索引模型根据 Issue 内容生成。

描述

TLDR

How do I import all the dependencies required for a jar file I'm setting as input?

First I want to say, this repository is a game changer for debugging native Android plugins. I'm using it to see exactly what APIs are exposed to TypeScript for any .jar file.

For example, here's a gist of the BoltsFramework/Bolts-Android bolts.Task.d.ts.

I'm having an issue with dts-generator.jar and detecting dependentcies for the input jar file.

Example:

java -jar dts-generator.jar -input bolts-tasks-1.4.0.jar

Error:

Exception in thread "main" java.lang.NoClassDefFoundError: Couldn't find class: java.lang.Exception required by class: bolts.AggregateException. You need to provide the jar containing the missing class: java.lang.Exception

What I've been doing so far is adding android.jar from $ANDROID_HOME/platforms/android-23/android.jar and adding it to an input like so:

java -jar dts-generator.jar -input android.jar -input bolts-tasks-1.4.0.jar -generate-multiple

Which most of the time results in a working output of *.d.ts files.

Although sometimes for example,

java -jar dts-generator.jar -input android.jar -input OneSignalSDK.jar -generate-multiple

Errors

Exception in thread "main" java.lang.NoClassDefFoundError: Couldn't find class: com.amazon.device.messaging.ADMMessageHandlerBase required by class: com.onesignal.ADMMessageHandler. You need to provide the jar containing the missing class: com.amazon.device.messaging.ADMMessageHandlerBase

Since the android.jar file does not contain com.amazon.device classes.

How do I import all the dependencies required for a jar file I'm setting as input?

主要语言
Java
星标
96
派生
25
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NativeScript/android-dts-generator 的其他 Issue

查看 NativeScript/android-dts-generator 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。