Android Tutorial GUI SDK Manager for newer versions of Android tools

Status
Not open for further replies.
Edit: If you are using B4A v7.8+ then a newer version of B4A Sdk Manager is preinstalled. Follow these instructions instead: https://www.b4x.com/b4a.html#installation

The GUI interface of Android SDK Manager has been removed in the latest version of Android SDK.
It was replaced with a command line tool named sdkmanager.bat.

Most developers, including new B4A developers, still use a version which does include the GUI interface, as the B4A download page points to an older version.
You can continue to use the currently installed Android tools.

A custom tool named B4A SDK Manager is provided as an alternative for developers who like to upgrade:

SS-2017-06-06_12.53.22.png


Installation instructions:

1. Download the latest sdk tools: https://developer.android.com/studio/index.html#command-tools
2. Create a folder for Android SDK. Don't put it under Program Files as it is a restricted folder. C:\android-sdk is a good option.
3. Unzip the sdk tools and copy the tools library to android sdk folder. It should look similar to:

SS-2017-05-29_15.44.54.png


4. Download B4ASdkManager.jar and double click on it. It requires Java 8u40+ to be installed.
5. Click on the open folder button and select sdkmanager.bat. It will be under <sdk path>\tools\bin
6. Install all recommended items. It can take a few minutes or more.
Licenses agreements will be printed. Read them and approve.
7. Don't forget to update B4A IDE to use the new SDK (Tools - Configure Paths - android.jar).

Next tutorial: AVD Manager / Emulator

The B4J source code is attached. It depends on jShell v1.5+.

Android SDK currently doesn't support Java 9. Make sure that B4A is configured to use Java 8 (Tools - Configure Paths).
 

Attachments

  • B4A-SdkManager-Source.zip
    63.3 KB · Views: 4,091
Last edited:

jimmyF

Active Member
Licensed User
Have you downloaded the latest Android SDK tools as explained in the first post?
I have been using Android Studio to manage my SDK installation.

When do you get this message? What happens next?
I get the message in the app log window after I click on "Install Selected".
It stops at the line:
Warning: File C:\Users\James.SEF2\.android\repositories.cfg could not be loaded.

As another issue:
The AVD Manager tells me that there are no definitions available. It was working before.
 

jimmyF

Active Member
Licensed User
Seems like a bit of a Department of Redundancy Department situation. :confused:
I now have 2 complete and alike copies of the SDK on disk.
Is it safe you use this copy with Android Studio?
Can I also update this copy alternatively in Android studio or must I now use the B4JsdkManager always?

Btw, it works now but finishes with
...
Info: "Install Google USB Driver (revision: 11)" finished.
done

Warning: File C:\Users\James.SEF2\.android\repositories.cfg could not be loaded."
in the log window.
 

lemonisdead

Well-Known Member
Licensed User
1/ create a sub directory named "AndroidEmulator" in C:\Windows and change its permissions to anybody (it should be a missing environment variable but on my part, Android_HOME or its path to the SDK never worked)
2/ to be sure XAHM was correctly installed, you can restart its installer from the extras folder. Alternatively, you can start haxm_check.exe in CLI to check if the requirements are ok
3/ I have both XAHM and Hyper-V running <- THIS IS NO MORE TRUE (I enter in a loop at restart after having installed Hyper-V when Xahm was previously installed)
 
Last edited:

Jmu5667

Well-Known Member
Licensed User
1/ create a sub directory named "AndroidEmulator" in C:\Windows and change its permissions to anybody (it should be a missing environment variable but on my part, Android_HOME or its path to the SDK never worked)
2/ to be sure XAHM was correctly installed, you can restart its installer from the extras folder. Alternatively, you can start haxm_check.exe in CLI to check if the requirements are ok
3/ I have both XAHM and Hyper-V running

Hey

Do you the windows creator update installed on your machine ?

John.
 

lemonisdead

Well-Known Member
Licensed User
Hello @moster67 : you are right and I have to edit my post about. It was right in the past : I had both running without doing nothing special.
To prove it I wanted to install Hyper-V on my new computer now and entered in a loop at restart
So I guess it is no more true
 

lemonisdead

Well-Known Member
Licensed User
@moster67 : sorry to point to you at each message, I am on the mobile..
It seems to be an issue more with Hyper-V : I just reinitialized the computer because of the loop, installed Hyper-V without having Xahm installed so. And it crashes again. I will report if I find a solution
 
Status
Not open for further replies.
Top