Skip to content

Commit

Permalink
CLI: remove 'sdkmanager' sub-command
Browse files Browse the repository at this point in the history
Attempting to use this command will fail with the following message:

    Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
            at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
            at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
            at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
            at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
            at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
    Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
            at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
            at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
            at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
            ... 5 more
  • Loading branch information
mortend committed Sep 21, 2018
1 parent 5b1c7ef commit c532ba7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 50 deletions.
8 changes: 0 additions & 8 deletions Documentation/CommandLineReference.md
Expand Up @@ -34,7 +34,6 @@ Experimental commands
stuff Built-in simple package manager
lint Parses uno source files and output syntax errors
adb Use Android Debug Bridge (adb)
sdkmanager Interact with Android's CLI SDK Manager
launch-apk Deploy and start APK on a connected device
open Open file(s) in external application
Expand Down Expand Up @@ -380,13 +379,6 @@ This commands forwards given arguments to 'adb', which is a tool included in the
Type 'uno adb' to see what's available.
```

## $ uno sdkmanager
```
Usage: uno sdkmanager [arguments ...]
Interact with Android's CLI SDK Manager.
```

## $ uno launch-apk
```
Usage: uno launch-apk [options] <filename>
Expand Down
5 changes: 4 additions & 1 deletion src/main/Uno.CLI/Android/AdbRunner.cs
@@ -1,14 +1,17 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Uno.Configuration;
using Uno.Diagnostics;

namespace Uno.CLI.Android
{
class AdbRunner
{
static string SdkDirectory => UnoConfig.Current.GetFullPath("Android.SDK.Directory", "AndroidSdkDirectory");

readonly Shell _shell;
readonly string _adb = Path.Combine(SDKManager.SdkDirectory,
readonly string _adb = Path.Combine(SdkDirectory,
"platform-tools", PlatformDetection.IsWindows ? "adb.exe" : "adb");

public AdbRunner(Shell shell)
Expand Down
7 changes: 4 additions & 3 deletions src/main/Uno.CLI/Android/LaunchApk.cs
Expand Up @@ -3,13 +3,16 @@
using System.IO;
using System.Threading;
using Mono.Options;
using Uno.Configuration;
using Uno.Diagnostics;
using Timer = System.Timers.Timer;

namespace Uno.CLI.Android
{
class LaunchApk : Command
{
static string NdkDirectory => UnoConfig.Current.GetFullPath("Android.NDK.Directory", "AndroidNdkDirectory");

const int Timeout = 7;

public override string Name => "launch-apk";
Expand Down Expand Up @@ -145,9 +148,7 @@ public override void Execute(IEnumerable<string> args)

static void NdkStack(string input, string symbolDir)
{
var filename = Path.Combine(
SDKManager.NdkDirectory,
"ndk-stack");
var filename = Path.Combine(NdkDirectory, "ndk-stack");

if (PlatformDetection.IsWindows)
filename = File.Exists(filename + ".exe")
Expand Down
36 changes: 0 additions & 36 deletions src/main/Uno.CLI/Android/SDKManager.cs

This file was deleted.

1 change: 0 additions & 1 deletion src/main/Uno.CLI/Program.cs
Expand Up @@ -32,7 +32,6 @@ public class Program : Command
new Diagnostics.Ls(),
new Diagnostics.Lint(),
new Android.Adb(),
new Android.SDKManager(),
new Android.LaunchApk(),
new System.Open(),
};
Expand Down
1 change: 0 additions & 1 deletion src/main/Uno.CLI/Uno.CLI.csproj
Expand Up @@ -43,7 +43,6 @@
<ItemGroup>
<Compile Include="Android\AdbDevice.cs" />
<Compile Include="Android\Adb.cs" />
<Compile Include="Android\SDKManager.cs" />
<Compile Include="Diagnostics\Ls.cs" />
<Compile Include="Packages\Doctor.cs" />
<Compile Include="Packages\Feed.cs" />
Expand Down

0 comments on commit c532ba7

Please sign in to comment.