Git Product home page Git Product logo

extension-template's People

Contributors

ewpatton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

extension-template's Issues

Error when trying to rebuild an extension.

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.

Unable to Override the Built-in Library

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?

Generated extensions do not work

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.