Local native install on macbook pro fails

ios
nativescriptcore

#1

Hi Guys,

I have spend many hours getting nativescript installed and up and running locally on my Macbook pro. I did manage to install xcode, xcode command line tools, the android sdk.

tns setup fails with.

Error: Could not find or load main class java.se.ee

I googled and found some entries having to do with java 9. However I have java version 8 installed.

On my last run I captured the tns setup output.
I am including here the part where the fail occurs.
I really want to get going with nativescript and would appreciate any help to could get me out of the gate:

Installing xcodeproj… This might take some time, please, be patient.
HEAD https://api.rubygems.org/api/v1/dependencies
200 OK

-sdk/3859397/tools/lib/layoutlib-api-25.3.1.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/dvlib-25.3.1.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/repository-25.3.1.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/gson-2.2.4.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/commons-compress-1.8.1.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/httpclient-4.1.1.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/httpmime-4.1.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/common-25.3.1.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/kxml2-2.3.0.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/annotations-25.3.1.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/annotations-12.0.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/jimfs-1.1.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/httpcore-4.1.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/commons-logging-1.1.1.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/commons-codec-1.4.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/guava-18.0.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/jaxb-api-2.3.0.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/jaxb-core-2.3.0.jar:/usr/local/Caskroom/android-sdk/3859397/tools/lib/jaxb-impl-2.3.0.jar com.android.sdklib.tool.SdkManagerCli extras;google;m2repository
Error: Could not find or load main class java.se.ee
WARNING: There seem to be some problems with the Android configuration
Do you want to install Android emulator? (y/n)


#2

can you try setting up Android SDK using android studio instead of brew?


#3

Hi Vamsi,

I had already installed android studio prior to running tns setup.

Before I ran tns setup I followed the instructions on this link to install nativescript on Mac.

https://docs.nativescript.org/start/ns-setup-os-x

When I start android studio it detects that there are 2 installs of android SDK and gives me a choice as to which one to use.

  • One in /Users/frankhil/Library/android/sdk
    • I think this is the one that was installed prior to running tns setup
  • One in /usr/local/share/android-sdk

My perception is that the manual install of the components as per link https://docs.nativescript.org/start/ns-setup-os-x all succeeded but when I run “tns run ios” or “tns run android” it does not recognize that and automatically starts running “tns setup” autnomatically.


#4

I had the similar problem, I’ve removed all the android sdks and installed from Android Studio, then it worked, what is the output of “tns doctor”?


#5

The problem on a mac is that it is not that straightforward to uninstall anything having to do with java.
I haven’t found a straightforward uninstall option but I will look for it and keep you posted.
(I can’t pursue this full time though would like to)

Here is the output from tns doctor.
If I choose “Configure for local builds” then I loop back into “tns setup”.

:heavy_check_mark: Python installed and configured correctly.
:heavy_multiplication_x: WARNING: The Python ‘six’ package not found.
This package is required by the Debugger library (LLDB) for iOS. You can install it by first making sure you have pip installed and then running ‘pip install six’ from the terminal.

You have nativescript-cloud extension installed, so you can execute cloud builds, but your environment is not configured properly and you will not be able to execute local builds. To continue, choose one of the following options:
Select “Configure for Local Builds” to run the setup script and automatically configure your environment for local builds.
Select “Skip Step and Configure Manually” to disregard this option and install any required components manually.
You have nativescript-cloud extension installed, so you can execute cloud builds, but your environment is not configured properly and you will not be able to execute local builds. To continue, choose one of the following options:
Select “Configure for Local Builds” to run the setup script and automatically configure your environment for local builds.
Select “Skip Step and Configure Manually” to disregard this option and install any required components manually.
? To continue, choose one of the following options: (Use arrow keys)
❯ Try Cloud Operation
Configure for Local Builds
Skip Step and Configure Manually


#6

The output says python package six is not installed.

Try pip3 install six and re-run tns doctor to see if output changes.


#7

I did re-install python and installed pip3 as you suggested.
Here is the output from the pip3 install six

Franciscuss-MacBook-Pro:bin frankhil$ pip3 install six
Collecting six
Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six
Successfully installed six-1.11.0

tns doctor however still loops back into tns setup.

Here is the output:

Python installed and configured correctly.
:heavy_multiplication_x: WARNING: The Python ‘six’ package not found.
This package is required by the Debugger library (LLDB) for iOS. You can install it by first making sure you have pip installed and then running ‘pip install six’ from the terminal.

You have nativescript-cloud extension installed, so you can execute cloud builds, but your environment is not configured properly and you will not be able to execute local builds. To continue, choose one of the following options:
Select “Configure for Local Builds” to run the setup script and automatically configure your environment for local builds.
Select “Skip Step and Configure Manually” to disregard this option and install any required components manually.
You have nativescript-cloud extension installed, so you can execute cloud builds, but your environment is not configured properly and you will not be able to execute local builds. To continue, choose one of the following options:
Select “Configure for Local Builds” to run the setup script and automatically configure your environment for local builds.
Select “Skip Step and Configure Manually” to disregard this option and install any required components manually.
? To continue, choose one of the following options: (Use arrow keys)
❯ Try Cloud Operation
Configure for Local Builds
Skip Step and Configure Manually


#8

running this command resolved python six issue
“easy_install -U six”