Rush provides all the AndroidX libraries used by AI2 with identical versions. You can find the available AndroidX libraries here. If a library is unavailable, you need to add the required JARs as dependencies to your Rush project.
Also, it's worth noting that AI2 uses very initial versions of all these libraries. So, even if some library is available, it's very much possible that some imports may not work if they were added in a later version of the library. In such cases, you should add the JAR of a newer version of that library as a dependency, and (important) build with ProGuard optimization turned on. You can turn on optimization either by passing the -r (--release) flag while building or adding this in your rush.yml:
how to update rush to new app inventor libraries?
and androidruntime.jar
import com.google.appinventor.components.common.OptionList;
import com.google.appinventor.components.common.Default;
import com.google.appinventor.components.annotations;
I want to use the @Options
┌ Checking project files
│ info Checking metadata file (rush.yml)
│ info Checking AndroidManifest.xml file
└ done
┌ Compiling sources
│ info Picked 1 source file
└ done
┌ Processing the extension
│ info Linking extension assets
│ info Generating DEX bytecode
│ Compilation failed with an internal error.
│ java.lang.IllegalArgumentException: Unsupported class file major version 62
│ at com.android.tools.r8.A.a.a.f.(:10)
│ at com.android.tools.r8.A.a.a.f.(:2)
│ at com.android.tools.r8.A.a.a.f.(:1)
│ at com.android.tools.r8.A.a.a.f.(:107)
│ at com.android.tools.r8.graph.x0.a(:24)
│ at com.android.tools.r8.dex.a$a.a(:12)
│ at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1428)
│ at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
│ at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
│ at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
│ at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
│ at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
└ failed
got this error when i put this - deps:
- tess4j-5.7.0.jar
- commons-io-2.12.0.jar
│ erro The following error occurred while validating metadata file (rush.yml):
│ type ‘_InternalLinkedHashMap<String, dynamic>’ is not a subtype of type ‘YamlMap’ in type cast
└ failed