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.
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.
Thanks, I deleted my post as to not create confusion/issues.
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.
Thank you, successfully done.
Just replace android lib with androidx lib.
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.
Meanwhile, you can download the full source:
Ok ... and then what should i do with it (so that the extension template works)?
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:
I'll see what I can do about it this week.
App Inventor Source Code | Extension Template Repository | |
---|---|---|
Link | mit-cml/appinventor-sources | mit-cml/extension-template |
Download Size | ~500 MB Requires whole App Inventor sources |
< 60 MB Only required libraries |
Publishing an open-source extension | You need to publish the code separately |
You can just fork the repository and add your code inside, and people will able to compile it without changing anything |
Stability | As it contains the full source code, it will compile the extensions as expected. |
As Extension Template Repository is new, some errors may occur as @Anke reported on #29. |
Build Steps | Same, the command isant extensions |
Same, the command isant extensions |
Requires Additional Software | Apache Ant JDK |
Apache Ant JDK |
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.
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
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.