Extension Template Repository

I didn't pull in all of the android-support libraries from App Inventor, but if you also have the appinventor-sources checked out you can copy them from lib/android/support/ so everything is available to your extension.

1 Like

Because the support libraries are baked into every app, doing this will cause dx to fail compilation due to duplicate classes since it will come once from the buildserver and once from the extension.

2 Likes

Thanks, I deleted my post as to not create confusion/issues.

1 Like

No worries. Adding the library is usually the right behavior. I don't know why Android/Google chose not to handle copies of the exact same class during compilation, but it causes many headaches.

3 Likes

Thank you, successfully done.

@ewpatton Can you please update the Extension Template Respository (→ AndroidX).

I got this error:

1 Like

Just replace android lib with androidx lib.

1 Like

That's not the only thing that needs to be changed. In fact the android.jar present in lib directory is very different from AndroidX, and there exists no such thing as a single AndroidX library. It is a collection of different libraries, altogether known as AndroidX libraries.

In addition to that, there were quite a lot changes done in nb184 release, so, other files needs to be updated as well to reflect these changes.

1 Like

Meanwhile, you can download the full source:

2 Likes

Ok ... and then what should i do with it (so that the extension template works)?

http://kio4.com/appinventor/125B_extensiones_crear_i.htm

1 Like

Someone can explain me what's the difference between building an extension with this and building with app Inventor source code? What are the pros and cons?

Thanks in advance.

See e.g. here:

1 Like

Is there still hope for an update to the AndroidX lib (in the near future)? @ewpatton

Error
1 Like

I'll see what I can do about it this week.

2 Likes
App Inventor Source Code Extension Template Repository
Link mit-cml/appinventor-sources mit-cml/extension-template
Download Size :x:
~500 MB
Requires whole App Inventor sources
:white_check_mark:
< 60 MB
Only required libraries
Publishing an open-source extension :x:
You need to publish the code separately
:white_check_mark:
You can just fork the repository and add your code inside, and people will able to compile it without changing anything
Stability :white_check_mark:
As it contains the full source code, it will compile the extensions as expected.
:warning:
As Extension Template Repository is new, some errors may occur as @Anke reported on #29.
Build Steps Same, the command is
ant extensions
Same, the command is
ant extensions
Requires Additional Software Apache Ant
JDK
Apache Ant
JDK
16 Likes

@yusufcihan also extension templete compiles extension in 10 to 15 seconds

The extension template repository has been updated to support the latest version of App Inventor (v185). With this change I've split the repository into two parts. All of the App Inventor dependencies are now published in a separate repository at https://github.com/mit-cml/extension-deps. The template repository stores a reference to that repository through a git submodule dependency.

  • If you merge from this repo to get an update, you should run git submodule update --init after merging to get the dependencies.
  • If you're cloning a fresh template, GitHub seems to drop the submodule. In this case, run the upgrade-appinventor.sh script included in the repository to get the dependencies.

As we release new versions of the App Inventor companion, developers should run upgrade-appinventor.sh to ensure they compile their extensions against the latest version of App Inventor.

8 Likes

Hi, I am trying to build an extension but when I run git submodule update --init it shows this

After a few tries the dialog box no longer popup

1 Like

I am also facing same issue.
But files are getting downloaded successfully.

After that when I try to compile extension it shows android package not found.Probably because I don't know how to use extension deps repo.

1 Like