0

I have installed java jdk 1.8 and later the android SDK. Android SDK manager won't open, it flashes for a second and nothing else happen. By running android.bat i get the following error:

C:\android\tools>android.bat

Exception in thread "main" java.lang.UnsatisfiedLinkError: no     swt-win32-3550 or
        swt-win32 in swt.library.path, java.library.path or the jar file
        at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
        at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
        at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
        at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
        at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:402)
        at com.android.sdkmanager.Main.doAction(Main.java:390)
        at com.android.sdkmanager.Main.run(Main.java:150)
        at com.android.sdkmanager.Main.main(Main.java:116)

I have set the environment variable:

JAVA_HOME > C:\Program Files\Java\jdk1.8.0_102.

Installed, reinstalled, redownloaded both java and android sdk, run as administrator, disabled antivirus, also tried many solutions found here without luck.

Bertrand Martel
  • 42,756
  • 16
  • 135
  • 159
im7xs
  • 195
  • 2
  • 2
  • 12
  • There is this similar thread which could help you.http://stackoverflow.com/questions/6234403/sdk-manager-exe-doesnt-work – lsiva Jul 21 '16 at 16:38
  • OS type and version, memory (RAM), Eclipse version, where you downloaded it from... all good things to know... – Jon Goodwin Jul 21 '16 at 16:57
  • Win7 ultimate 64bit, 8gb, not using Eclipse. Downloaded from official websites. thanks. – im7xs Jul 21 '16 at 16:58
  • the second line of your debug says: org.eclipse.swt.internal.Library.loadLibrary – Jon Goodwin Jul 21 '16 at 16:59
  • what are you trying to do, the current jdk is 8 ? – Jon Goodwin Jul 21 '16 at 17:03
  • don't have ecplipse intalled, I use b4a maybe this install some eclipse component. yes jdk 8 – im7xs Jul 21 '16 at 17:04
  • I repeat again, what are you trying to do ? without android eclipse or studio ? – Jon Goodwin Jul 21 '16 at 17:08
  • I use a RAD called basic4android, and it requires JAVA and ANDROID SDK. I have been using this from years, now this problem happen with my new laptop. The software have always worked perfectly on win7. – im7xs Jul 21 '16 at 17:10
  • By the way it is very naughty to use the JDK with android, but it does work if you know what you are doing (I do it) but then I am a very naughty boy ;O) – Jon Goodwin Jul 21 '16 at 17:11
  • i.c. I think you need to get the WHOLE thing (then delete stuff you don't need) meaning a full eclipse or studio download WITH SDK integrated. And NDK for the full experience. – Jon Goodwin Jul 21 '16 at 17:13
  • I think i need only the android SDK manager to works to continue my work. Not eclipse, thaks for your recommandations. – im7xs Jul 21 '16 at 17:16
  • but what you are downloading HAS Eclipse dependencies... that's why I asked where you are downloading it from, you see ? – Jon Goodwin Jul 21 '16 at 17:17
  • https://www.b4x.com/ – im7xs Jul 21 '16 at 17:20
  • You said you were using official sites, https://developer.android.com/index.html has android in the tilte, quite a big clue. – Jon Goodwin Jul 21 '16 at 17:25
  • I dowloaded android sdk from developer.android and java from oracle ofc :') – im7xs Jul 21 '16 at 17:26
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/117960/discussion-between-im7xs-and-jon-goodwin). – im7xs Jul 21 '16 at 17:27
  • SNAFU Getting to the root of it. – Jon Goodwin Jul 21 '16 at 19:18

3 Answers3

1

You could try installing Android Studio, which should guide you through the setup and usually results with a working Android sdk. If the studio itself isn't desired, remove it but not the sdk when you are done.

TheNumenorean
  • 86
  • 1
  • 6
0

Add the following environment variables

ANDROID_SDK_ROOT - where you installed your sdk

Update your PATH variable to include this:

;%ANDROID_SDK_ROOT%/tools;%ANDROID_SDK_ROOT%/platform-tools;%JAVA_HOME%/bin

Bill
  • 4,506
  • 2
  • 18
  • 29
0

Keep in mind, too, that Java 8 isn't fully supported. In fact, no version of android prior to N (which is just a preview) supports Java 8 at all. Even Android N doesn't support every single language feature. See details on how to use Java 8 in Android and which of its features will be supported in N here: https://developer.android.com/preview/j8-jack.html

It's not possible to target Android N for a "real" app yet since there are no physical devices to run it, so I suggest sticking with JDK 1.7 for now.