Rush • A new and improved way of building extensions

Hi, this AIA contains the 2 extensions that is being used and will replicate the error. Source code for the extension is on the post above.
testing.aia (379.7 KB)

Error log:

Kodular is unable to compile this project.
The compiler error output was
________Preparing application icon
________Creating animation xml
________Creating fragment xml
________Creating listview xml in res/layout/..
________Creating listview xml in res/layout-v21/..
________Creating xml in res/drawable/..
________Creating splash png in res/drawable/..
________Creating colors xml
________Creating styles xml
________Creating drawables xml v21
________Checking for firebase
________Creating provider_path xml
________Creating network_security_config xml
________Generating adaptive icon file
________Generating round adaptive icon file
________Generating adaptive icon background file
________Generating manifest file
________Attaching native libraries
________Attaching Android Archive (AAR) libraries
________Attaching component assets
________Invoking AAPT
AAPT time: 0.952 seconds
________Compiling source files
(compiling io/kodular/facebooklee52/testing/Screen1.yail to io.kodular.facebooklee52.testing.Screen1)
(compiling /tmp/runtime6458243650290595638.scm to com.google.youngandroid.runtime)
Kawa compile time: 1.872 seconds
________Invoking DX
DX time: 3.811 seconds
________Invoking ApkBuilder
com.android.sdklib.build.ApkCreationException: Failed to add /tmp/1639991628189_0.7981854571382332-0/youngandroidproject/../build/tmp/classes2.dex
YAIL compiler - ApkBuilder failed.
.

Looks like either your extensions or one of their dependencies are using a Java 8 language feature – lambda expressions. App Inventor doesn’t support this, and hence, fails to compile your extension with the app. To fix this, enable the desugaring of Java 8 lang. features in Rush using rush.yml:

build:
  desugar:
    enable: true
    desugar_deps: true
3 Likes

Thanks a lot, I really appreciate your CLI tool! It helps to create extensions easliy

Hi @Shreyash, when we migrate any template dir to rush it do not migrates manifest annotation.
is there any way to achieve it ?

The migrate command already does that – it generates an AndroidManifest.xml that’s equivalent to the manifest annotations defined in your source file. Although it’s worth mentioning that it won’t remove those (in fact, any) annotations from the Java source file generated in the migrated Rush project, you will have to remove them manually for the extension to compile.

2 Likes

hey, i need help installing, i always get an error when i try to install rush.


1 Like

instead windows powershell you should use the -
image
which you have to manually install from the web

2 Likes

can you send me a downlod link? :sweat_smile:

if you have microsoft store then you can download from there easily

3 Likes

I am using Windows 11 as well but I managed to installed the cli with the default powershell. I dont think installing another version helps

1 Like

I managed to install powershell 7 in windows

1 Like

M.H@MH MINGW32 ~/Desktop
$ rush upgrade
info Fetching data…
erro Something went wrong:
DioError [DioErrorType.other]: SocketException: Failed host lookup: ‘rush-api.shreyashsaitwal.repl.co’ (OS Error: No such host is known.
, errno = 11001)
#0 DioMixin.assureDioError (package:dio/src/dio_mixin.dart:819)
#1 DioMixin._dispatchRequest (package:dio/src/dio_mixin.dart:678)

#2 DioMixin.fetch.. (package:dio/src/dio_mixin.dart:586)

1 Like

Can you try again? It should be fixed now.

2 Likes

same error

M.H@MH MINGW32 ~/Desktop
$ rush upgrade
info Fetching data...
erro Something went wrong:
DioError [DioErrorType.other]: HandshakeException: Handshake error in client (OS Error:
        CERTIFICATE_VERIFY_FAILED: certificate has expired(../../third_party/boringssl/src/ssl/handshake.cc:359))
#0      DioMixin.assureDioError (package:dio/src/dio_mixin.dart:819)
#1      DioMixin._dispatchRequest (package:dio/src/dio_mixin.dart:678)
<asynchronous suspension>
#2      DioMixin.fetch.<anonymous closure>.<anonymous closure> (package:dio/src/dio_mixin.dart:586)
<asynchronous suspension>


1 Like

Umm, that should not happen. Can you just keep trying again until it works?

2 Likes

This post was flagged by the community and is temporarily hidden.

@Shreyash repl.co sites are not up 24x7
image

1 Like

You’re getting the “Cannot GET /” error because you’re using the wrong path, the URL is working correctly.

4 Likes

@UnknownBeast You can find out the endpoints in rush source code

https://rush-api.shreyashsaitwal.repl.co/contents
Screenshot 2022-01-05 at 7.39.12 PM
https://rush-api.shreyashsaitwal.repl.co/release
Screenshot 2022-01-05 at 7.38.57 PM

3 Likes

Hey @Shreyash I am having some issues regarding desugaring. Whenever a class is implementing

android.app.Application.ActivityLifecycleCallbacks

I get this warning during compilation:

can't find referenced class android.app.Application$ActivityLifecycleCallbacks$$CC

and if I ignore this in progaurd, the app crashes and the same error appears in the logcat.
Previously I got the same error when I was using

android.animation.Animator.AnimatorListener

and this interface also

android.content.ServiceConnection