Set proguard: true
on fast.yml
and run fast build -r
command. The -o
command is specially designed to optimize libraries of Kotlin when desugar_deps
is enabled.
An update is available v2.0.0
Date built: 22.11.24.00.52
- Added Maven dependency resolver.
- The
sync
command has been optimized. - Removed some duplicate libraries to optimize ProGuard task.
- The
.gitignore
file has been modified. - Remove comments from default project.
- Updated
AndroidRuntime.jar
with these changes.
Enter a new era of extension development with FAST 2.0, unlocking the full power of Maven like dependency management.
How to use resolver?
To see how to use remote dependencies, start a new project. Remember, whenever you add or change any remote libraries, you'll need to run fast sync
and before running the fast build
. However, you could use remote libraries in your old projects. Just you need to reconfigure the fast.yml
to be compatible with FAST 2.0.
A clean installation of FAST 2.0 is required.
So, instead of updating I have to reinstall fast after uninstalling it?
Getting this
__ _
/ _| __ _ ___| |_
| |_ / _` / __| __|
| _| (_| \__ \ |_
|_| \__,_|___/\__| (v2.0.0)
- Fetching local dependencies
- Resolving compile-time dependencies
- Searching for required dependencies
x Failed to collect dependencies at org.jetbrains.kotlinx:kotlinx-coroutines-core:jar:1.7.1```
My fast.yml depndencies
compile_time:
- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1
- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1
- org.jetbrains.kotlin:kotlin-stdlib:1.9.10
- com.squareup.okhttp3:okhttp:4.12.0
- com.google.code.gson:gson:2.10.1
- androidx.lifecycle:lifecycle-runtime-ktx:2.7.0
- androidx.lifecycle:lifecycle-common-java8:2.7.0
- androidx.appcompat:appcompat:1.6.1
- androidx.fragment:fragment-ktx:1.6.2
- androidx.activity:activity-ktx:1.8.2
- androidx.browser:browser:1.7.0
- androidx.core:core-ktx:1.12.0 ```
Could you kindly send me the logs.txt
file so that I can investigate the cause of the issue?
Fast is initialized.
The installed fast version is: 2.0.0 22.11.24.00.52
fast sync initialized.
Got FAST_HOME from environment variable.
Got 77 libraries.
Resolving compile-time dependencies
Attaching local repository system.
Initializing resolver system.
Initializing resolver session.
Adding artifacts to request manager.
Specifing excludes to request manager.
Attaching dependencies with excludes.
Adding default repositories.
Preparing request manager.
Searching for required dependencies...
com.jewel.fast.repacked.WrXpVAiYvnQVSghLJXFU: Failed to collect dependencies at org.jetbrains.kotlinx:kotlinx-coroutines-core:jar:1.7.1
com.jewel.fast.repacked.WrXpVAiYvnQVSghLJXFU: Failed to collect dependencies at org.jetbrains.kotlinx:kotlinx-coroutines-core:jar:1.7.1
at com.jewel.fast.repacked.dQHskAhgrrdcXovGlEca.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.yFGXdDHQPAzVOShoMKAX.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.LrTvejpuRurApQBfJRGk.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.splxdFOAnwapCSmSbUXV.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.rljcywctKAWaXpVvWQQy.<init>(Unknown Source)
at com.jewel.fast.Fast.main(Unknown Source)
Caused by: java.util.concurrent.ExecutionException: java.lang.VerifyError: Operand stack overflow
Exception Details:
Location:
com/jewel/fast/repacked/bOoqCSByqNVoYTmvQYpD.iUIKuJlLwsOpwhRkqGDF()Lcom/jewel/fast/repacked/ytxmcJfuSzqoCiiMlZfW; @437: iconst_1
Reason:
Exceeded max stack size.
Current Frame:
bci: @437
flags: { }
locals: { 'com/jewel/fast/repacked/bOoqCSByqNVoYTmvQYpD', 'com/jewel/fast/repacked/bOoqCSByqNVoYTmvQYpD', 'com/jewel/fast/repacked/XoTxAdlNIwrNXKtyQjmr', 'com/jewel/fast/repacked/BKtyWhTYjylgAwrAgAgf' }
stack: { uninitialized 286, uninitialized 286, '[Lcom/jewel/fast/repacked/ZqNBwibbknzWCOvNxvqG;', '[Lcom/jewel/fast/repacked/ZqNBwibbknzWCOvNxvqG;', integer, uninitialized 421, uninitialized 421, '[Ljava/lang/String;', '[Ljava/lang/String;', '[I' }
Bytecode:
0000000: 2ab4 002c b800 3099 01f1 2a59 4cc2 2ab4
0000010: 002c b800 3099 01c4 bb00 3259 b200 1403
0000020: 2ebd 0034 59b2 0014 042e bb00 3659 b700
0000030: 3853 59b2 0014 052e bb00 3a59 b700 3b53
0000040: 59b2 0014 062e bb00 3d59 b700 3e2a b400
0000050: 40b8 0045 5359 b200 1407 2ebb 0047 59b7
0000060: 0048 5359 b200 1408 2ebb 004a 59b7 004b
0000070: 5359 b200 1410 062e bb00 4d59 b700 4e53
0000080: 59b2 0014 1007 2ebb 0050 59b7 0051 5359
0000090: b200 1410 082e bb00 5359 b700 5453 59b2
00000a0: 0014 1009 2ebb 0056 59b7 0057 53b7 005a
00000b0: 4dbb 005c 59b2 0014 1007 2ebd 0034 59b2
00000c0: 0014 042e bb00 5e59 b700 5f53 59b2 0014
00000d0: 052e bb00 3a59 b700 3b53 59b2 0014 062e
00000e0: bb00 6159 b700 622a b400 40b8 0045 5359
00000f0: b200 1407 2ebb 004a 59b7 004b 5359 b200
0000100: 1408 2ebb 004d 59b7 004e 5359 b200 1410
0000110: 062e bb00 5059 b700 5153 b700 634e bb00
0000120: 6559 b200 1410 062e bd00 3459 b200 1404
0000130: 2ebb 0067 59b7 0068 2ab4 0040 b800 4553
0000140: 59b2 0014 052e 2ab4 006a b200 6db8 0071
0000150: 9900 2bbb 0073 59b7 0074 1276 b600 7a57
0000160: 1100 9811 009c 8211 00c0 1100 8782 1016
0000170: 1051 8202 827e a300 0c01 b0bb 003a 59b7
0000180: 003b 5359 b200 1406 2ebb 004d 59b7 004e
0000190: 5359 b200 1407 2ebb 0050 59b7 0051 5359
00001a0: b200 1408 2ebb 007e 59b2 0014 052e bd00
00001b0: 1659 b200 1404 2eb2 0018 b200 1404 2e32
00001c0: 53b7 0081 53b7 0082 3a04 2abb 0084 592c
00001d0: 2d19 04b7 0087 b500 2c2b c312 76b6 007a
00001e0: 5710 1910 5c82 1015 1050 8202 827e 9e00
00001f0: 0a01 b04d 2bc3 2cbf 2ab4 002c b0
Exception Handler Table:
bci [14, 475] => handler: 499
Stackmap Table:
full_frame(@379,{Object[#2],Object[#2],Object[#50],Object[#92]},{Uninitialized[#286],Uninitialized[#286],Object[#124],Object[#124],Integer})
full_frame(@386,{Object[#2],Object[#2],Object[#50],Object[#92]},{Uninitialized[#286],Uninitialized[#286],Object[#124],Object[#124],Integer,Object[#58]})
chop_frame(@473,2)
full_frame(@499,{Top,Object[#2]},{Object[#137]})
full_frame(@504,{Object[#2]},{})
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at com.jewel.fast.repacked.UMGWERkZEeogAIgofyvV.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
... 6 more
Caused by: java.lang.VerifyError: Operand stack overflow
Exception Details:
Location:
com/jewel/fast/repacked/bOoqCSByqNVoYTmvQYpD.iUIKuJlLwsOpwhRkqGDF()Lcom/jewel/fast/repacked/ytxmcJfuSzqoCiiMlZfW; @437: iconst_1
Reason:
Exceeded max stack size.
Current Frame:
bci: @437
flags: { }
locals: { 'com/jewel/fast/repacked/bOoqCSByqNVoYTmvQYpD', 'com/jewel/fast/repacked/bOoqCSByqNVoYTmvQYpD', 'com/jewel/fast/repacked/XoTxAdlNIwrNXKtyQjmr', 'com/jewel/fast/repacked/BKtyWhTYjylgAwrAgAgf' }
stack: { uninitialized 286, uninitialized 286, '[Lcom/jewel/fast/repacked/ZqNBwibbknzWCOvNxvqG;', '[Lcom/jewel/fast/repacked/ZqNBwibbknzWCOvNxvqG;', integer, uninitialized 421, uninitialized 421, '[Ljava/lang/String;', '[Ljava/lang/String;', '[I' }
Bytecode:
0000000: 2ab4 002c b800 3099 01f1 2a59 4cc2 2ab4
0000010: 002c b800 3099 01c4 bb00 3259 b200 1403
0000020: 2ebd 0034 59b2 0014 042e bb00 3659 b700
0000030: 3853 59b2 0014 052e bb00 3a59 b700 3b53
0000040: 59b2 0014 062e bb00 3d59 b700 3e2a b400
0000050: 40b8 0045 5359 b200 1407 2ebb 0047 59b7
0000060: 0048 5359 b200 1408 2ebb 004a 59b7 004b
0000070: 5359 b200 1410 062e bb00 4d59 b700 4e53
0000080: 59b2 0014 1007 2ebb 0050 59b7 0051 5359
0000090: b200 1410 082e bb00 5359 b700 5453 59b2
00000a0: 0014 1009 2ebb 0056 59b7 0057 53b7 005a
00000b0: 4dbb 005c 59b2 0014 1007 2ebd 0034 59b2
00000c0: 0014 042e bb00 5e59 b700 5f53 59b2 0014
00000d0: 052e bb00 3a59 b700 3b53 59b2 0014 062e
00000e0: bb00 6159 b700 622a b400 40b8 0045 5359
00000f0: b200 1407 2ebb 004a 59b7 004b 5359 b200
0000100: 1408 2ebb 004d 59b7 004e 5359 b200 1410
0000110: 062e bb00 5059 b700 5153 b700 634e bb00
0000120: 6559 b200 1410 062e bd00 3459 b200 1404
0000130: 2ebb 0067 59b7 0068 2ab4 0040 b800 4553
0000140: 59b2 0014 052e 2ab4 006a b200 6db8 0071
0000150: 9900 2bbb 0073 59b7 0074 1276 b600 7a57
0000160: 1100 9811 009c 8211 00c0 1100 8782 1016
0000170: 1051 8202 827e a300 0c01 b0bb 003a 59b7
0000180: 003b 5359 b200 1406 2ebb 004d 59b7 004e
0000190: 5359 b200 1407 2ebb 0050 59b7 0051 5359
00001a0: b200 1408 2ebb 007e 59b2 0014 052e bd00
00001b0: 1659 b200 1404 2eb2 0018 b200 1404 2e32
00001c0: 53b7 0081 53b7 0082 3a04 2abb 0084 592c
00001d0: 2d19 04b7 0087 b500 2c2b c312 76b6 007a
00001e0: 5710 1910 5c82 1015 1050 8202 827e 9e00
00001f0: 0a01 b04d 2bc3 2cbf 2ab4 002c b0
Exception Handler Table:
bci [14, 475] => handler: 499
Stackmap Table:
full_frame(@379,{Object[#2],Object[#2],Object[#50],Object[#92]},{Uninitialized[#286],Uninitialized[#286],Object[#124],Object[#124],Integer})
full_frame(@386,{Object[#2],Object[#2],Object[#50],Object[#92]},{Uninitialized[#286],Uninitialized[#286],Object[#124],Object[#124],Integer,Object[#58]})
chop_frame(@473,2)
full_frame(@499,{Top,Object[#2]},{Object[#137]})
full_frame(@504,{Object[#2]},{})
at com.jewel.fast.repacked.JJGNpozGuLmFjTFKEGKz.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.aW.<init>(Unknown Source)
at com.jewel.fast.repacked.aZ.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.aZ.uoxdOjGmWDOumFkAnDUP(Unknown Source)
at com.jewel.fast.repacked.GuYoGyJydLfcNwJHFgoa.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.pItQrNxlFoWLgKmokaLw.<init>(Unknown Source)
at com.jewel.fast.repacked.TsKlvNCdMeQcJczcfJDs.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.wcjGtxPltjSEVLhWpVId.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.iIzGlzDCnnUXnfdCmotC.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.iIzGlzDCnnUXnfdCmotC.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.iIzGlzDCnnUXnfdCmotC.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.IvyJGwrmGDriAOxuKQKR.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.IvyJGwrmGDriAOxuKQKR.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.dQHskAhgrrdcXovGlEca.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.UMGWERkZEeogAIgofyvV.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
at com.jewel.fast.repacked.UMGWERkZEeogAIgofyvV.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
An update is available v2.0.1
Date built: 22.11.24.21.37
- Fixed dependency resolving for JDK11
- Changes on terminal prints (debug info).
- Downgraded Java version to
1.8
fortesting-support-R-classes.jar
to be compatible with JDK8 and above. - Added a few more debug info.
Getting this error with fast sync command.
- Resolving compile-time dependencies
- Searching for required dependencies
Exception in thread "main" java.lang.AbstractMethodError: Receiver class com.jewel.fast.repacked.ch$$Lambda$202/0x00000008001f7040 does not define or inherit an implementation of the resolved method abstract accept$60e6cabc$266adaeb(Lcom/jewel/fast/repacked/aD;Ljava/util/List;)Z of interface com.jewel.fast.repacked.ARULKwjPRRePNqMOwTRn.
at com.jewel.fast.repacked.cm.grrkcuGxbTnLYhkKvwZa(Unknown Source)
at com.jewel.fast.repacked.co.grrkcuGxbTnLYhkKvwZa(Unknown Source)
at com.jewel.fast.repacked.DShknTXLfXIiitMXhUhS.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.ch.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.ch.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.ch.ZivXshevkoZcsMCzFzpR(Unknown Source)
at com.jewel.fast.repacked.bT.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.bM.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.dQHskAhgrrdcXovGlEca.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.yFGXdDHQPAzVOShoMKAX.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.LrTvejpuRurApQBfJRGk.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.splxdFOAnwapCSmSbUXV.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.rljcywctKAWaXpVvWQQy.<init>(Unknown Source)
at com.jewel.fast.Fast.main(Unknown Source)
Could you try with JDK8 or JDK11?
Obfuscating the code makes it harder to locate the error.
Jdk 11
It works fine when I tested it with JDK 11 and JDK 17. I'll look into it more.
This is my fast.yml file
# The name of the extension developer
author: edu
# The minimum Android SDK level your extension supports. Minimum SDK defined in
# AndroidManifest.xml or @DesignerComponent are ignored, you should always define it here.
min_sdk: 26
# If enabled, it will optimizes the extension with ProGuard.
proguard: true
# If enabled, Kotlin Standard Libraries (V1.9.24) will be included with the extension.
# If you want to add specific Kotlin Standard Libraries so disable it.
kotlin: false
# If enabled, you will be able to use Java 8 language features in your extension source code.
desugar_sources: false
# Enable it, if any of your dependencies use Java 8 language features.
desugar_deps: false
# If enabled, the D8 tool will generate desugared (classes.jar) classes.dex
desugar_dex: true
# Default repositories are Maven Central, Google Maven, JCenter and JitPack.
# If the library you want to use is not available in these repositories, add here by specifying their URLs.
# repositories:
# - https://repo.spring.io/plugins-release/
# Extension dependencies [JAR & AAR Should be present into deps directory]
dependencies:
- androidx.recyclerview:recyclerview:1.0.0
- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1
- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1
- org.jetbrains.kotlin:kotlin-stdlib:1.9.10
- com.squareup.okhttp3:okhttp:4.12.0
- com.google.code.gson:gson:2.10.1
- androidx.lifecycle:lifecycle-runtime-ktx:2.7.0
- androidx.lifecycle:lifecycle-common-java8:2.7.0
- androidx.appcompat:appcompat:1.6.1
- androidx.fragment:fragment-ktx:1.6.2
- androidx.activity:activity-ktx:1.8.2
- androidx.browser:browser:1.7.0
- androidx.core:core-ktx:1.12.0
# Define compile-time dependencies only [Remote only]
#compile_time:
# Define dependencies those are should be skipped during resolving. [Remote only]
# excludes:
# - androidx.recyclerview:recyclerview:1.0.0
# Extension assets. [Should be present into assets directory]
#assets:
#- my-awesome-asset.anything
# If enabled, the version number of every component will be increased automatically.
auto_version: true
# If enabled, @annotations will be not present in built extension.
deannonate: true
# If enabled, matching classes provided by MIT will not be included in the built extension.
filter_mit_classes: false
# If enabled, R8 will be used instead of ProGuard and D8 dexer.
# NOTE: It's an experimental feature.
# R8: false
And this is the error I am facing
husnain@Husnain-Macbook-Pro testdependency % fast sync
__ _
/ _| __ _ ___| |_
| |_ / _` / __| __|
| _| (_| \__ \ |_
|_| \__,_|___/\__| (v2.0.1)
- Fetching local dependencies
- Resolving runtime dependencies
- Searching for required dependencies
Exception in thread "main" java.lang.AbstractMethodError: com.jewel.fast.repacked.ch$$Lambda$184/1782704802.accept$60e6cabc$266adaeb(Lcom/jewel/fast/repacked/aD;Ljava/util/List;)Z
at com.jewel.fast.repacked.cm.grrkcuGxbTnLYhkKvwZa(Unknown Source)
at com.jewel.fast.repacked.co.grrkcuGxbTnLYhkKvwZa(Unknown Source)
at com.jewel.fast.repacked.DShknTXLfXIiitMXhUhS.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.ch.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.ch.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.ch.ZivXshevkoZcsMCzFzpR(Unknown Source)
at com.jewel.fast.repacked.bT.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.bM.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.dQHskAhgrrdcXovGlEca.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.yFGXdDHQPAzVOShoMKAX.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.LrTvejpuRurApQBfJRGk.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.splxdFOAnwapCSmSbUXV.iUIKuJlLwsOpwhRkqGDF(Unknown Source)
at com.jewel.fast.repacked.rljcywctKAWaXpVvWQQy.<init>(Unknown Source)
at com.jewel.fast.Fast.main(Unknown Source)
You should try like below:
dependencies:
- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1
- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1
- org.jetbrains.kotlin:kotlin-stdlib:1.9.10
- com.squareup.okhttp3:okhttp:4.12.0
- com.google.code.gson:gson:2.10.1
- androidx.lifecycle:lifecycle-runtime-ktx:2.7.0
- androidx.lifecycle:lifecycle-common-java8:2.7.0
- androidx.activity:activity-ktx:1.8.2
- androidx.browser:browser:1.7.0
These are provided by AI2 and FAST cannot override them.
- androidx.recyclerview:recyclerview:1.0.0
- androidx.lifecycle:lifecycle-runtime-ktx:2.7.0
- androidx.appcompat:appcompat:1.6.1
- androidx.fragment:fragment-ktx:1.6.2
- androidx.core:core-ktx:1.12.0
And you were getting the issue for the fragment-ktx
library.
What if we want to use different versions than those provided by app inventor?
Whenever I add - androidx.activity:activity-ktx:1.8.2
it gives error otherwise resolved successfully. With this - androidx.activity:activity-ktx:1.8.2
tried jdk 8 jdk 11 and jdk 17, no success.
In that case, we need to download the AAR/JAR file to use it locally.
I have also tested it with JDK8 and 11. The problem does not seem to be related to the JDK version. It appears that the Maven tool itself is unable to resolve version conflicts. I will attempt to optimize the tool or potentially introduce a new one to address this issue.
Do dependencies resolve completely automatically? I mean, I add a dependency to a given library and Fast searches the Pom files for more dependencies?
Pom files also specify whether a dependency is required at compile time or run time. Is that also taken into account?