mit-cml / extension-template Goto Github PK
View Code? Open in Web Editor NEWTemplate repository for creating App Inventor extensions
Template repository for creating App Inventor extensions
The build fails when I try to rebuild an extension after building it for the first time. Here is the compiler output:
$ ant extensions
Buildfile: e:\Shreyash\AI2-Extensions\build.xml
javac:
[javac] Compiling 3 source files to e:\Shreyash\GitHub\AI2-Extensions\build\classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 7
[javac] warning: [options] source value 7 is obsolete and will be removed in a future release
[javac] warning: [options] target value 7 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] 4 warnings
process:
[java]
[java] Extensions : Generating extensions
[java]
[java] Extensions : Generating files [io.shreyash.snacky]
BUILD FAILED
e:\Shreyash\GitHub\AI2-Extensions\build.xml:45: java.io.IOException: Unable to create temporary path for extension build
at com.google.appinventor.components.scripts.ExternalComponentGenerator.copyRelatedExternalClasses(ExternalComponentGenerator.java:357)
at com.google.appinventor.components.scripts.ExternalComponentGenerator.generateExternalComponentBuildFiles(ExternalComponentGenerator.java:163)
at com.google.appinventor.components.scripts.ExternalComponentGenerator.generateAllExtensions(ExternalComponentGenerator.java:113)
at com.google.appinventor.components.scripts.ExternalComponentGenerator.main(ExternalComponentGenerator.java:71)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:218)
at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:155)
at org.apache.tools.ant.taskdefs.Java.run(Java.java:861)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:231)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1391)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1254)
at org.apache.tools.ant.Main.runBuild(Main.java:830)
at org.apache.tools.ant.Main.startAnt(Main.java:223)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
Total time: 3 seconds
BTW, if I perform ant clean
, the extension builds successfully.
I want to use a newer version of a class that its older version is provided by the built-in library, because it has a new method that the older version doesn't have. I placed the newer version of the class (in jar format) in the lib/deps/ directory, but the compiler failed to compile. The error message said there was no such method to call, so that clearly indicates the compiler is still referring to the older version.
I've found there is two ways to overcome this problem. One is deleting the older version in the lib/appinventor/ directory. Another is directly moving the newer version into the the lib/appinventor/ directory and replacing the older version.
The compilation is successful when using either way above. But when the resulting .aix file is imported and used to build an Android App, and when this app calls the method in question, the same error message appears, saying no such method.
So, the app seems still calling the older version instead of the new one, and my problem is not completely solved. I would like to know if there is a way to override the built-in library during the app building phase too?
We're sorry, something went wrong.
We were unable to clone mit-cml/extension-template's contents into pavi2410/ext-template. The template you used includes files that are larger than 10 megabytes. Please ask mit-cml to remove those files from the template and try again.
Repo link: https://github.com/pavi2410/ext-template
When can we expect an update to the NB187 version?
I'm running into some issues because I need too much jar files for my extension. The error I'm getting is
[java] trouble writing output: Too many method references to fit in one dex file: 126456; max is 65536.
[java] You may try using multi-dex. If multi-dex is enabled then the list of classes for the main dex list is too large.
Somebody mentioned a solution here
https://community.appinventor.mit.edu/t/how-to-add-multidex-support-to-appinventor/257
Any extension I compile with this template will not work correctly when imported into App Inventor. The build succeeds, but after importing into AI, the following error message appears Error from companion: Cannot find the component: TextBox1
. Probably because the textbox is the first component I access after initialization. The extension from this template is smaller with the same source code [1], so maybe there are some files missing
I'm using ant 1.10.1, jdk 1.8.0_131 and Windows 10
[1] mathtools.zip
PS: The zip file contains two extensions: One was generated using appinventor-sources, the other one was generated using this repository. Both use the same source code
Is there any chance for supporting kotlin code?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.