Android Tutorial GUI SDK Manager for newer versions of Android tools

Jaames

Active Member
Licensed User
Thanks, I'll try later, when I'm home. But it seems to work, I'm on mobile internet here , so I can't download now.

for those , who's B4ASdkManager.jar is located in folder which include space character like mine "E:\B4A\SDK Instalacije"

do like this:

1. Right click on windows icon (win 10 64 bit anniversary update here) and chose "Windows PowerShell(Admin)"
2. In PwerShell type cd "YOUR FOLDER WITH B4ASdkManager.jar" with quotemarks Important ex.: cd "E:\B4A\SDK Instalacije"
3. Then type .\B4ASdkManager.jar


ps.jpg

b4a.jpg

[EDIT]
Or you can copy attached B4ASdkManager.txt file to the same folder where B4ASdkManager.jar is located and rename it to B4ASdkManager.bat and double click to that file. (It will run the .jar file with Administrative rights)

Version 2.10 fixed this issue, I did not have to delete any files, just run B4ASdkManager.jar.
 

Attachments

Last edited:

Erel

Administrator
Staff member
Licensed User
V2.10 is released. It fixes the error discussed above. No need to run it as an administrator.

If you previously failed to install a component then it might still fail. If it happens then search the sdk folder for files named .installData and delete all of them.
 

Alessandro71

Active Member
Licensed User
what about this error:

i get it from B4ASdkManager and from sdkmanager.bat --list also

B4X:
Exception in thread "main" java.lang.NoSuchFieldError: FN_AAPT2
        at com.android.sdklib.BuildToolInfo.<init>(BuildToolInfo.java:352)
        at com.android.sdklib.BuildToolInfo.fromStandardDirectoryLayout(BuildToolInfo.java:224)
        at com.android.sdklib.repository.legacy.local.LocalSdk.scanBuildTools(LocalSdk.java:898)
        at com.android.sdklib.repository.legacy.local.LocalSdk.getPkgsInfos(LocalSdk.java:544)
        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:517)
        at com.android.repository.api.RepoManager$DummyProgressRunner.runSyncWithProgress(RepoManager.java:397)
        at com.android.repository.impl.manager.RepoManagerImpl.load(RepoManagerImpl.java:364)
        at com.android.repository.api.RepoManager.loadSynchronously(RepoManager.java:290)
        at com.android.sdklib.repository.AndroidSdkHandler$RepoConfig.createRepoManager(AndroidSdkHandler.java:718)
        at com.android.sdklib.repository.AndroidSdkHandler.getSdkManager(AndroidSdkHandler.java:295)
        at com.android.sdklib.tool.SdkManagerCli.<init>(SdkManagerCli.java:134)
        at com.android.sdklib.tool.SdkManagerCli.main(SdkManagerCli.java:118)
        at com.android.sdklib.tool.SdkManagerCli.main(SdkManagerCli.java:93)
B4ASdkManager also adds
Info: Parsing legacy package:
C:\Android\android-sdk\add-ons\addon-google_apis-google-15
 

Alessandro71

Active Member
Licensed User
it seems deleting
tools/lib/common.jar
solved the issue

i followed the first post instructions overwriting an existing sdk installation
 

biometrics

Active Member
Licensed User
Hi Erel,

I'm using this tool to get notifications working. I notice it's installing SDK Platform 24 whereas I had 25. Not sure it makes much difference. Question is, will you be updating the "recommended" section regularly?

Also I wasn't sure if I needed a clean install or if I should overwrite my current tools directory. I opted for a clean install. Is that the right approach?
 
Hello,

Very good work. I'm testing it and I think it will be great if there is a download progress bar by size and files :
eg:
1153kb on 3780Kb
35/123 files

Thanks again.

PS: It's like someone trashes our old good tools. No pity for old ... computers ?
 

Erel

Administrator
Staff member
Licensed User
I'm testing it and I think it will be great if there is a download progress bar by size and files :
The packages are downloaded by sdkmanager.bat which is part of Android SDK. It doesn't report any progress so there are no reasonable ways to track the progress (the total size is also unknown).
 

Erel

Administrator
Staff member
Licensed User
V2.20 is released. It fixes an issue with missing updates.
 

William Hunter

Active Member
Licensed User
V2.20 is released. It fixes an issue with missing updates.
I have installed the new version. When I run the AVD Manager, I get the Java error shown in Image One. Once I close the error message the AVD Manager loads fine, as shown in Image Two, and I can successfully run an emulator. The error message is confusing.

Regards
SDKmanagerOne.png SDKmanagerTwo.png
 

Erel

Administrator
Staff member
Licensed User
Can you run the source code from B4J and see where it fails?
 

jimmyF

Active Member
Licensed User
I also encountered the same error:

Error occurred on line: 284 (Main)
java.lang.NullPointerException
at b4j.example.main._isinstalled(main.java:1399)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:613)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:228)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:77)
at anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub.resume(DebugResumableSub.java:19)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:135)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:84)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:482)
at anywheresoftware.b4a.keywords.Common.access$0(Common.java:462)
at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:536)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:748)
on this line:
B4X:
If si.Key = s.Key And si.version = s.version Then Return True
 

Erel

Administrator
Staff member
Licensed User
Can you run it with this code:
B4X:
Public Sub IsInstalled (si As SdkItem) As Boolean
   For Each s As SdkItem In InstalledItems
     Log("IsInstalled: " & si & ", " & s)
     If si.Key = s.Key And si.version = s.version Then Return True
   Next
   Return False
End Sub
It will fill the logs. Please post the last rows before the error.
 

jimmyF

Active Member
Licensed User
, version=22, AndroidVersion=21, AndroidVersionForSorting=21
]
IsInstalled: [IsInitialized=false, Key=system-images;android-24;default;x86, description=null
, version=null, AndroidVersion=null, AndroidVersionForSorting=null
], [IsInitialized=true, Key=system-images;android-23;google_apis;x86, description=Google APIs Intel x86 Atom System Image
, version=23, AndroidVersion=23, AndroidVersionForSorting=23
]
IsInstalled: [IsInitialized=false, Key=system-images;android-24;default;x86, description=null
, version=null, AndroidVersion=null, AndroidVersionForSorting=null
], [IsInitialized=true, Key=system-images;android-23;google_apis;x86_64, description=Google APIs Intel x86 Atom_64 System Image
, version=23, AndroidVersion=23, AndroidVersionForSorting=23
]
IsInstalled: [IsInitialized=false, Key=system-images;android-24;default;x86, description=null
, version=null, AndroidVersion=null, AndroidVersionForSorting=null
], [IsInitialized=true, Key=system-images;android-24;default;x86, description=Intel x86 Atom System Image
, version=8, AndroidVersion=24, AndroidVersionForSorting=24
]
Error occurred on line: 291 (Main)
java.lang.NullPointerException
at b4j.example.main._isinstalled(main.java:1402)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:613)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:228)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:77)
at anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub.resume(DebugResumableSub.java:19)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:135)
 
Top