Android Question Conversion to Androidx SDK

Cliff McKibbin

Member
Licensed User
The release notes on b4a 9.3 included a step to convert to Androidx SDK.
Following the installation, the instructions read "bring up the b4a SDK Manager and then install the recommended items".
I brought it up and there are no recommended items.
I note that the entry text box for "SDK Manager.bat" is empty. Is there supposed to be a path entered there?

When I compile, I do get the first list "b4a Version 9.3".

I would like to get this resolved before loading your new version 9.5.

Following this initial note above, I tried filling in the box above with the path to the SDK Manager.bat, pressed the button with the arrows on it and did get recommended items. I installed them and now do get the compile with Androidx SDK.
I also then did the step 'Jetify' and it found no entries. I also 'cleaned' the project.

However, I now get errors as shown on the attached screen shot.
Am I missing a library, or something in the 'Manifest Editor' ?
Thanks for any help.

Following the above request, I returned to the SDK Manager and reran to bring up items for the install. I received the following error messages:
This may have something to do with the problem with the Font messages in the compile.


Error: Exception in thread "main" java.lang.NoSuchFieldError: FN_AAPT2
at com.android.sdklib.BuildToolInfo.<init>(BuildToolInfo.java:362)
at com.android.sdklib.BuildToolInfo.fromStandardDirectoryLayout(BuildToolInfo.java:233)
at com.android.sdklib.repository.legacy.local.LocalSdk.scanBuildTools(LocalSdk.java:897)
at com.android.sdklib.repository.legacy.local.LocalSdk.getPkgsInfos(LocalSdk.java:543)
at com.android.sdklib.repository.legacy.LegacyLocalRepoLoader.parseLegacyLocalPackage(LegacyLocalRepoLoader.java:100)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.parsePackages(LocalRepoLoaderImpl.java:167)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.getPackages(LocalRepoLoaderImpl.java:124)
at com.android.repository.impl.manager.RepoManagerImpl$LoadTask.run(RepoManagerImpl.java:518)
at com.android.repository.api.RepoManager$DummyProgressRunner.runSyncWithProgress(RepoManager.java:397)
at com.android.repository.impl.manager.RepoManagerImpl.load(RepoManagerImpl.java:365)
at com.android.repository.api.RepoManager.loadSynchronously(RepoManager.java:290)
at com.android.sdklib.repository.AndroidSdkHandler$RepoConfig.createRepoManager(AndroidSdkHandler.java:725)
at com.android.sdklib.repository.AndroidSdkHandler.getSdkManager(AndroidSdkHandler.java:296)
at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.setSdkHandler(SdkManagerCliSettings.java:101)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.<init>(SdkManagerCli.java:95)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:74)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)

5:00 pm. Success: DonManfred's process (see below) fixed it.
1. I redownloaded the SDK as he instructed. The copy of 'Platforms' went faster than usual because his download only has Android-28 in it.
2. Changed the Jar Path to Android-28 as instructed.
3. Redid the steps to install the SDK Manager and 'suggested items' . I still got the errors shown below, but pressed on.
4. Redid Jetify
5. Redid Clean
6. Compile now works showing 'Android SDK' and the errors with some Fonts are gone.
7. App loaded onto my test Android phone.

Thanks Manfred!!
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top