Problem creating extension

Hello, I’m trying to create an extension according to the guide here:

I did everything, everything is good, in java code I entered the code that is in the tutorial, and it does not work! I put everything in the path they wrote, and I run the command: ant extensions on the appinventor folder. This shows me the error:

Build failed```

And in the tutorial it is not written to create the file: build.xml!
1 Like

You may want to send the whole error log instead if just Build Failed, otherwise nothing can be diagnosed from this.

5 Likes

you should try using rush

2 Likes

I fail if rush, I installed, and that I run it I get an error that does not exist!

bash: /data/data/com.termux/files/usr/bin/rush: Bad address

Buildfile: /storage/emulated/0/appinventor-sources/appinventor/build.xml

extensions:

clean:

common_CommonVersion:

init:

CommonVersion:
[exec] Result: 128
[exec] Result: 128
[javac] Compiling 3 source files to /storage/emulated/0/appinventor-sources/appinventor/common/build/classes/CommonVersion
[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] /storage/emulated/0/appinventor-sources/appinventor/common/build/src/com/google/appinventor/common/version/GitBuildId.java:17: error: unclosed string literal
[javac] public static final String GIT_BUILD_VERSION = “fatal: not a git repository (or any parent up to mount point /storage)
[javac] ^
[javac] /storage/emulated/0/appinventor-sources/appinventor/common/build/src/com/google/appinventor/common/version/GitBuildId.java:18: error: ‘;’ expected
[javac] Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).”;
[javac] ^
[javac] /storage/emulated/0/appinventor-sources/appinventor/common/build/src/com/google/appinventor/common/version/GitBuildId.java:18: error: ‘,’, ‘)’, or ‘[’ expected
[javac] Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).";
[javac] ^
[javac] /storage/emulated/0/appinventor-sources/appinventor/common/build/src/com/google/appinventor/common/version/GitBuildId.java:18: error: unclosed string literal
[javac] Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).";
[javac] ^
[javac] /storage/emulated/0/appinventor-sources/appinventor/common/build/src/com/google/appinventor/common/version/GitBuildId.java:19: error: unclosed string literal
[javac] public static final String GIT_BUILD_FINGERPRINT = “fatal: not a git repository (or any parent up to mount point /storage)
[javac] ^
[javac] /storage/emulated/0/appinventor-sources/appinventor/common/build/src/com/google/appinventor/common/version/GitBuildId.java:20: error: ‘;’ expected
[javac] Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).”;
[javac] ^
[javac] /storage/emulated/0/appinventor-sources/appinventor/common/build/src/com/google/appinventor/common/version/GitBuildId.java:20: error: ‘,’, ‘)’, or ‘[’ expected
[javac] Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).";
[javac] ^
[javac] /storage/emulated/0/appinventor-sources/appinventor/common/build/src/com/google/appinventor/common/version/GitBuildId.java:20: error: unclosed string literal
[javac] Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).";
[javac] ^
[javac] 8 errors
[javac] 4 warnings

BUILD FAILED
/storage/emulated/0/appinventor-sources/appinventor/build.xml:46: The following error occurred while executing this line:
/storage/emulated/0/appinventor-sources/appinventor/build-common.xml:321: The following error occurred while executing this line:
/storage/emulated/0/appinventor-sources/appinventor/common/build.xml:118: The following error occurred while executing this line:
/storage/emulated/0/appinventor-sources/appinventor/build-common.xml:125: Compile failed; see the compiler error output for details.

Total time: 3 seconds

are you doing this on phone using termux shell ?? Because the root directory is /storage/emulated/0/

I don’t think :thinking: MIT app inventor sources can compile extension using termux

1 Like

Yes​:blush:, I’m on vacation, I’m not home and I do not have the computer next to me, so I tried over the phone …
I thought it would work, because I installed everything properly …

You can use Appybuilder or Niotron idle

Both site are down right now !

1 Like

One more extension builder is available :grin:
http://bot.colintree.cn:8048/

3 Likes

Thanks, I’ll check out the extension builder you brought.

I did not understand how to use the extensions you brought that worked, how to open a project, and how to enter Java code.

You have create Java code and then upload java file there. After few minutes you will get aix file.

1 Like

By using proot (which could easily be done with a script by AnLiunux), it is possible to install jdk8 and apache-ant. I have built an extension successfully with the original appinventor-sources, but no luck with rush-cli.

Anyway, in my opinion, the most convenient way is what @vknow360 suggested, if you trust the website well enough.

Can you get me a Java code of an extension that will work? I tried a certain code and it did not work for me. I’d be happy if you bring me a code to check.

I would be happy if you bring me a short guide on how to do this, I also could not install a rush …

In the same page they have given link for collintree code, copy and paste into onecompiler.com , download it as java and upload into this site and click submit, you will see the aix

I did not understand, I write the code on the site you brought? what am I doing?

I went to the site you brought, downloaded the code that is there as Java, uploaded to the site of the extensions, sent and received the error:
Error: Config does not contain a field package failed auto detecting package info