NativeScript / android-dts-generator

A tool that generates TypeScript declaration files (.d.ts) from Jars
90 stars 23 forks source link

Error when trying to generate definitions #41

Closed hettiger closed 5 years ago

hettiger commented 5 years ago

I'm trying to generate definitions like described in the docs:

Generate definitons for Android SDK

cd dts-generator
./gradlew jar
java -jar build/libs/dts-generator.jar -input %ANDROID_HOME%/platforms/android-<Platform Level (21/22/23/24)>/android.jar
[17:22:36] hettiger:android-dts-generator git:(master*) $ cd dts-generator
[17:22:46] hettiger:dts-generator git:(master*) $ ./gradlew jar

BUILD SUCCESSFUL in 0s
3 actionable tasks: 3 up-to-date
[17:22:51] hettiger:dts-generator git:(master*) $ java -jar build/libs/dts-generator.jar -input ${ANDROID_HOME}/platforms/android-28/android.jar
Android d.ts Generator Version : 2.0.0
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/bcel/classfile/FieldOrMethod
    at com.telerik.dts.Generator.start(Generator.java:34)
    at com.telerik.Main.main(Main.java:37)
Caused by: java.lang.ClassNotFoundException: org.apache.bcel.classfile.FieldOrMethod
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 2 more

Am I doing something wrong here?

vtrifonov commented 5 years ago

@hettiger can you try again getting the code from master?

hettiger commented 5 years ago

@vtrifonov Thank you. I can confirm it is working now.