I've pushed another commit that should fix this. You will still need to include the lib in @UsesLibraries
.
Is there any news about this?
Will this project continue at some point?
@Anke I’ve updated the repo to fix the bug in question. As we make further changes to the extension system I’m willing to update it. I think the only thing outstanding at this point is porting the Proguard functionality that @Diego implemented in the main repo. Is there something in particular missing that you need?
Thanks, I didn’t notice that change / last fix.
I tried to follow a suggestion from @vishwas to simplify my first extension My first extension - quadratic equation
this way:
public YailList Calc(float a, float b, float c) {
float x1 = /*YOUR CODE TO FIND THE FIRST SOLUTION*/;
float x2 = /*YOUR CODE TO FIND THE SECOND SOLUTION*/;
return YailList.makeList(new Object[] {x1, x2});
}
but unfortunately that fails:
I got this PM from @vishwas
It looks like you cannot use the gnu.lists.Pair
module in the template repository. The YailList module uses Pair to make the list, hence the build failed when you added the list to your code. Evan might have a better idea as to why this is happening as he’s the author of the template repository.
(I just tried making the extension using the full AI sources, and it works:thinking:)
Is there any solution for that?
I added kawa-1.10.jar
, which contains gnu-lists.Pair
from the App Inventor sources to the libraries and in the build.xml to solve that issue
@Anke place in
lib/deps/kawa-1.11-modified.jar
and dont forget import and add anotation library..
import com.google.appinventor.components.annotations.UsesLibraries;
and
@UsesLibraries(libraries = "kawa-1.11-modified.jar")
This is not necessary for me. See modifications in
import com.google.appinventor.components.runtime.util.YailList
should do it
I’ve updated the template to include the version of Kawa from appinventor-sources. That should fix the issue.
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.