Error importing .jar with extension-templates


image

Buildfile: /home/iaiaia/Documentos/Kodular/CriarExtensoes/extension-templates/ModernGraphics/build.xml

javac.helpers:

javac:
    [javac] Compiling 1 source file to /home/iaiaia/Documentos/Kodular/CriarExtensoes/extension-templates/ModernGraphics/build/classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
    [javac] /home/iaiaia/Documentos/Kodular/CriarExtensoes/extension-templates/ModernGraphics/src/io/moderngraphics/ModernGraphics.java:12: error: package org.jfree.chart does not exist
    [javac] import org.jfree.chart.ChartFactory;
    [javac]                       ^
    [javac] /home/iaiaia/Documentos/Kodular/CriarExtensoes/extension-templates/ModernGraphics/src/io/moderngraphics/ModernGraphics.java:13: error: package org.jfree.chart does not exist
    [javac] import org.jfree.chart.JFreeChart;
    [javac]                       ^
    [javac] /home/iaiaia/Documentos/Kodular/CriarExtensoes/extension-templates/ModernGraphics/src/io/moderngraphics/ModernGraphics.java:14: error: package org.jfree.chart does not exist
    [javac] import org.jfree.chart.ChartUtilities;
    [javac]                       ^
    [javac] /home/iaiaia/Documentos/Kodular/CriarExtensoes/extension-templates/ModernGraphics/src/io/moderngraphics/ModernGraphics.java:15: error: package org.jfree.data.category does not exist
    [javac] import org.jfree.data.category.DefaultCategoryDataset;
    [javac]                               ^
    [javac] /home/iaiaia/Documentos/Kodular/CriarExtensoes/extension-templates/ModernGraphics/src/io/moderngraphics/ModernGraphics.java:16: error: package org.jfree.chart.plot does not exist
    [javac] import org.jfree.chart.plot.PlotOrientation;
    [javac]                            ^
    [javac] /home/iaiaia/Documentos/Kodular/CriarExtensoes/extension-templates/ModernGraphics/src/io/moderngraphics/ModernGraphics.java:54: error: cannot find symbol
    [javac]     private DefaultCategoryDataset createDataset(YailList data) {
    [javac]             ^
    [javac]   symbol:   class DefaultCategoryDataset
    [javac]   location: class ModernGraphics
    [javac] /home/iaiaia/Documentos/Kodular/CriarExtensoes/extension-templates/ModernGraphics/src/io/moderngraphics/ModernGraphics.java:69: error: cannot find symbol
    [javac]     private void saveChartAsImage(JFreeChart chart, String filePath, int width, int height) {
    [javac]                                   ^
    [javac]   symbol:   class JFreeChart
    [javac]   location: class ModernGraphics
    [javac] 
    [javac] 
    [javac] An annotation processor threw an uncaught exception.
    [javac] Consult the following stack trace for details.
    [javac] java.lang.RuntimeException: Too many parameters for setter for SetBarChartData
    [javac] 	at com.google.appinventor.components.scripts.ComponentProcessor.executableElementToProperty(ComponentProcessor.java:1953)
    [javac] 	at com.google.appinventor.components.scripts.ComponentProcessor.processProperties(ComponentProcessor.java:2540)
    [javac] 	at com.google.appinventor.components.scripts.ComponentProcessor.processComponent(ComponentProcessor.java:1869)
    [javac] 	at com.google.appinventor.components.scripts.ComponentProcessor.process(ComponentProcessor.java:1551)
    [javac] 	at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:802)
    [javac] 	at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:713)
    [javac] 	at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
    [javac] 	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1043)
    [javac] 	at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1184)
    [javac] 	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
    [javac] 	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
    [javac] 	at com.sun.tools.javac.main.Main.compile(Main.java:523)
    [javac] 	at com.sun.tools.javac.main.Main.compile(Main.java:381)
    [javac] 	at com.sun.tools.javac.main.Main.compile(Main.java:370)
    [javac] 	at com.sun.tools.javac.main.Main.compile(Main.java:361)
    [javac] 	at com.sun.tools.javac.Main.compile(Main.java:56)
    [javac] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [javac] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [javac] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [javac] 	at java.lang.reflect.Method.invoke(Method.java:498)
    [javac] 	at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:57)
    [javac] 	at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1352)
    [javac] 	at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1092)
    [javac] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
    [javac] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [javac] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [javac] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [javac] 	at java.lang.reflect.Method.invoke(Method.java:498)
    [javac] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
    [javac] 	at org.apache.tools.ant.Task.perform(Task.java:350)
    [javac] 	at org.apache.tools.ant.Target.execute(Target.java:449)
    [javac] 	at org.apache.tools.ant.Target.performTasks(Target.java:470)
    [javac] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
    [javac] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
    [javac] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    [javac] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
    [javac] 	at org.apache.tools.ant.Main.runBuild(Main.java:818)
    [javac] 	at org.apache.tools.ant.Main.startAnt(Main.java:223)
    [javac] 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
    [javac] 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)

BUILD FAILED
/home/iaiaia/Documentos/Kodular/CriarExtensoes/extension-templates/ModernGraphics/build.xml:49: Compile failed; see the compiler error output for details.

Total time: 1 second

I'm using extension-templates. How to solve?


Not Rush yet because it's not working.

You're trying to import a library which built with higher version than Java 7. You can only use that libraries which built using Java 7.

It's so limited :cry:

You must use Rush with the desugar option

Using extension-templates and importing worked well,
(rerun the script upgrade-appinventor.sh and update-deps.sh, maybe it works?!)
I use openjdk

java -version
openjdk version "1.8.0_352"

It seems that the problem is loading jFreeChart. I used another library and it worked normally.