epiCode Active Member Licensed User Sep 2, 2021 #1 Scenario: All SDK etc are installed as per instructions from B4A installation and work fine. Then I open an example which gives following error on compilation: Legacy-Support-v4 required Then I install it using B4A SDK Manager The error changes to androidx.activity required It keeps giving maven artifacts not found one after the other after installing like 30+ artifacts it finally moves on and... the program fails to compile with 2 errors: Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26) also other programs which compiled just fine with appcompat "earlier" refuse to compile now. Query: Is it possible to have a "known to work fine" androidx artifacts or their version (installed-components.txt) shared the same way SDK files in b4a installation process are ? What we are looking at basic appcompat and support files required by libraries like Drawer / Sliding panel / recycler / preferences. If anyone has a working set of working androidx, it would be nice if they can compress only the artifacts as defined in "installed-components.txt" (It would be a max of 30 ~ 50mb) Any other workaround/alternate solutions are welcome.
Scenario: All SDK etc are installed as per instructions from B4A installation and work fine. Then I open an example which gives following error on compilation: Legacy-Support-v4 required Then I install it using B4A SDK Manager The error changes to androidx.activity required It keeps giving maven artifacts not found one after the other after installing like 30+ artifacts it finally moves on and... the program fails to compile with 2 errors: Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26) also other programs which compiled just fine with appcompat "earlier" refuse to compile now. Query: Is it possible to have a "known to work fine" androidx artifacts or their version (installed-components.txt) shared the same way SDK files in b4a installation process are ? What we are looking at basic appcompat and support files required by libraries like Drawer / Sliding panel / recycler / preferences. If anyone has a working set of working androidx, it would be nice if they can compress only the artifacts as defined in "installed-components.txt" (It would be a max of 30 ~ 50mb) Any other workaround/alternate solutions are welcome.
Solution epiCode Sep 14, 2021 Erel said: 1. Which drawer are you using Click to expand... ACToolbar Erel said: You can try this example: https://www.b4x.com/android/forum/threads/appcompat-with-toolbar-minimal-example.79896/#content If it fails then your SDK is misconfigured. Click to expand... Thanks! It did fail but I managed to find a workaround and its compiling fine now Sharing the steps which worked for me, just in case it helps someone else 1. Removed all files and folder under Android\extra\b4a_local 2. Close b4a and Force close java.exe in Task Manager (if running) 3. Restart b4a - Open project - Clean Project (Ctrl + P) 4. Compile If this does not work, a clean restore of android\extra\ folder from resources_6_21.zip should (available here...
Erel said: 1. Which drawer are you using Click to expand... ACToolbar Erel said: You can try this example: https://www.b4x.com/android/forum/threads/appcompat-with-toolbar-minimal-example.79896/#content If it fails then your SDK is misconfigured. Click to expand... Thanks! It did fail but I managed to find a workaround and its compiling fine now Sharing the steps which worked for me, just in case it helps someone else 1. Removed all files and folder under Android\extra\b4a_local 2. Close b4a and Force close java.exe in Task Manager (if running) 3. Restart b4a - Open project - Clean Project (Ctrl + P) 4. Compile If this does not work, a clean restore of android\extra\ folder from resources_6_21.zip should (available here...
Erel B4X founder Staff member Licensed User Longtime User Sep 2, 2021 #2 AppCompat compiles fine with the recommended SDK. Which library caused an error? Upvote 0
epiCode Active Member Licensed User Sep 2, 2021 #3 Erel said: AppCompat compiles fine with the recommended SDK. Which library caused an error? Click to expand... It does not specify which library (error msg shared above) I searched the b4x forums and found that similar error was caused by data transport libs which you resolved for someone else earlier by reverting to old version of same libs. I've done a fresh install. So I don't have logs now. However, it is a time consuming but reproduceable error. I can not use any project which require recycler or v4 support - it goes in the same loop as described in post 1 Upvote 0
Erel said: AppCompat compiles fine with the recommended SDK. Which library caused an error? Click to expand... It does not specify which library (error msg shared above) I searched the b4x forums and found that similar error was caused by data transport libs which you resolved for someone else earlier by reverting to old version of same libs. I've done a fresh install. So I don't have logs now. However, it is a time consuming but reproduceable error. I can not use any project which require recycler or v4 support - it goes in the same loop as described in post 1
Erel B4X founder Staff member Licensed User Longtime User Sep 2, 2021 #4 mohsyn said: I searched the b4x forums and found that similar error was caused by data transport libs which you resolved for someone else earlier by reverting to old version of same libs. Click to expand... Not relevant if you use the recommended SDK. mohsyn said: I can not use any project which require recycler or v4 support - it goes in the same loop as described in post 1 Click to expand... The prepackaged SDK does support these features. Upvote 0
mohsyn said: I searched the b4x forums and found that similar error was caused by data transport libs which you resolved for someone else earlier by reverting to old version of same libs. Click to expand... Not relevant if you use the recommended SDK. mohsyn said: I can not use any project which require recycler or v4 support - it goes in the same loop as described in post 1 Click to expand... The prepackaged SDK does support these features.
epiCode Active Member Licensed User Sep 13, 2021 #5 Erel said: Not relevant if you use the recommended SDK. The prepackaged SDK does support these features. Click to expand... Hey @Erel I have narrowed down the issue to Appcompat Library v4 My project uses drawer and is dependent on lib AppCompat and has the following line in code B4X: #Extends: android.support.v7.app.AppCompatActivity Please suggest a workaround which does not involve discarding appcompat features Upvote 0
Erel said: Not relevant if you use the recommended SDK. The prepackaged SDK does support these features. Click to expand... Hey @Erel I have narrowed down the issue to Appcompat Library v4 My project uses drawer and is dependent on lib AppCompat and has the following line in code B4X: #Extends: android.support.v7.app.AppCompatActivity Please suggest a workaround which does not involve discarding appcompat features
Erel B4X founder Staff member Licensed User Longtime User Sep 14, 2021 #6 mohsyn said: Hey @Erel Click to expand... Don't do it. This is a public forum. 1. Which drawer are you using? 2. AppCompat works fine with AndroidX. All developers are using AndroidX for several years now. You can try this example: https://www.b4x.com/android/forum/threads/appcompat-with-toolbar-minimal-example.79896/#content If it fails then your SDK is misconfigured. Upvote 0
mohsyn said: Hey @Erel Click to expand... Don't do it. This is a public forum. 1. Which drawer are you using? 2. AppCompat works fine with AndroidX. All developers are using AndroidX for several years now. You can try this example: https://www.b4x.com/android/forum/threads/appcompat-with-toolbar-minimal-example.79896/#content If it fails then your SDK is misconfigured.
DonManfred Expert Licensed User Longtime User Sep 14, 2021 #7 Erel said: 1. Which drawer are you using? Click to expand... As i ran into the same problem a few weeks ago i guess he is using the AppCompat Drawer. The solution was to switch to b4xdrawer Upvote 1
Erel said: 1. Which drawer are you using? Click to expand... As i ran into the same problem a few weeks ago i guess he is using the AppCompat Drawer. The solution was to switch to b4xdrawer
epiCode Active Member Licensed User Sep 14, 2021 #8 Erel said: 1. Which drawer are you using Click to expand... ACToolbar Erel said: You can try this example: https://www.b4x.com/android/forum/threads/appcompat-with-toolbar-minimal-example.79896/#content If it fails then your SDK is misconfigured. Click to expand... Thanks! It did fail but I managed to find a workaround and its compiling fine now Sharing the steps which worked for me, just in case it helps someone else 1. Removed all files and folder under Android\extra\b4a_local 2. Close b4a and Force close java.exe in Task Manager (if running) 3. Restart b4a - Open project - Clean Project (Ctrl + P) 4. Compile If this does not work, a clean restore of android\extra\ folder from resources_6_21.zip should (available here https://www.b4x.com/b4a.html) Cheers! Upvote 0 Solution
Erel said: 1. Which drawer are you using Click to expand... ACToolbar Erel said: You can try this example: https://www.b4x.com/android/forum/threads/appcompat-with-toolbar-minimal-example.79896/#content If it fails then your SDK is misconfigured. Click to expand... Thanks! It did fail but I managed to find a workaround and its compiling fine now Sharing the steps which worked for me, just in case it helps someone else 1. Removed all files and folder under Android\extra\b4a_local 2. Close b4a and Force close java.exe in Task Manager (if running) 3. Restart b4a - Open project - Clean Project (Ctrl + P) 4. Compile If this does not work, a clean restore of android\extra\ folder from resources_6_21.zip should (available here https://www.b4x.com/b4a.html) Cheers!