Skip to content

tns doctor does not report error when Java is 1.7 #1729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
enchev opened this issue Apr 28, 2016 · 9 comments
Closed

tns doctor does not report error when Java is 1.7 #1729

enchev opened this issue Apr 28, 2016 · 9 comments
Assignees

Comments

@enchev
Copy link
Contributor

enchev commented Apr 28, 2016

From @NathanaelA on April 27, 2016 16:25

Did you verify this is a real problem by searching

Yes

Tell us about the problem

Unable to build project

Will produce:
:asbg:generateInterfaceNamesList
java.lang.UnsupportedClassVersionError: com/ig/GetInterfaceNames : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Exception in thread "main" :asbg:generateInterfaceNamesList FAILED

FAILURE: Build failed with an exception.

  • Where:
    Build file 'D:\projects\nativescript\test2\platforms\android\build-tools\android-static-binding-generator\build.gradle' line: 30

  • What went wrong:
    Execution failed for task ':asbg:generateInterfaceNamesList'.

    Process 'command 'C:\Program Files\Java\jdk1.7.0_21\bin\java.exe'' finished with non-zero exit value 1

Which platform(s) does your issue occur on?

Android on Windows

Please provide the following version numbers that your issue occurs with:

TNS info says everything is 2.0.0

Please tell us how to recreate the issue in as much detail as possible.

tns create test
cd test
tns platform add android
tns run android --emulator

Copied from original issue: NativeScript/NativeScript#2044

@enchev
Copy link
Contributor Author

enchev commented Apr 28, 2016

From @dtopuzov on April 27, 2016 17:41

It looks you have Java 1.7.
{N} now require Java 1.8, see https://github.com/NativeScript/nativescript-cli#system-requirements

@enchev
Copy link
Contributor Author

enchev commented Apr 28, 2016

From @NathanaelA on April 27, 2016 18:15

Ah, TNS doctor does not report any issues!

@enchev
Copy link
Contributor Author

enchev commented Apr 28, 2016

From @sitefinitysteve on April 27, 2016 18:33

Doc should report this if possible +1

@enchev
Copy link
Contributor Author

enchev commented Apr 28, 2016

From @NathanaelA on April 27, 2016 23:24

Please note I upgraded to v1.8 - And this actually does fix the primary issue. Yeah!

HOWEVER,

  1. On 1.7, TNS Doctor as reported above said everything was good.
    2 On 1.8, TNS doctor now says I have issues with my ANDROID_HOME & android.bat file, even though I can run android.bat fine and I can now build perfectly fine.

@enchev
Copy link
Contributor Author

enchev commented Apr 28, 2016

From @sitefinitysteve on April 27, 2016 23:25

Someone needs to go back to medschool... Looking at you doc

@enchev
Copy link
Contributor Author

enchev commented Apr 28, 2016

From @bradmartin on April 28, 2016 3:27

I don't have those issues on my Win10 PC @NathanaelA w/ 1.8, I get:

Your components are up-to-date. No issues were detected.

No major issues now that I have Java 1.8 and running NS 2.0 on new apps. One minor issue about AppBuilderCallback (WTF - but it happened with 1.7.1 and has come up on Slack in recent weeks), and a good ole platform remove/add fix it every time.

@dtopuzov dtopuzov changed the title New & existing apps in 2.0 on Android fails to build tns doctor does not report error when Java is 1.7 Apr 28, 2016
@AhsanAyaz
Copy link

+1 :) having the same issue.. tns doctor should report this

@dtopuzov
Copy link
Contributor

dtopuzov commented Jun 6, 2016

Still valid in {N} 2.0.1. We do not check version, just check java is available.
However Java 1.7 looks already deprecated, see https://java.com/en/download/faq/java_7.xml

@enchev
Copy link
Contributor Author

enchev commented Jun 9, 2016

Fixed in #1824

@enchev enchev closed this as completed Jun 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants