@@ -23,10 +23,6 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
2323 { name : "lazy" , version : "^1.0.11" }
2424 ] ;
2525
26- private get sysInfoData ( ) : ISysInfoData {
27- return this . $sysInfo . getSysInfo ( path . join ( __dirname , ".." , ".." , "package.json" ) ) . wait ( ) ;
28- }
29-
3026 private _androidProjectPropertiesManagers : IDictionary < IAndroidProjectPropertiesManager > ;
3127
3228 constructor ( private $androidEmulatorServices : Mobile . IEmulatorPlatformServices ,
@@ -99,7 +95,8 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
9995
10096 // this call will fail in case `android` is not set correctly.
10197 this . $androidToolsInfo . getPathToAndroidExecutable ( { showWarningsAsErrors : true } ) . wait ( ) ;
102- this . $androidToolsInfo . validateJavacVersion ( this . sysInfoData . javacVersion , { showWarningsAsErrors : true } ) . wait ( ) ;
98+ let javaCompilerVersion = this . $sysInfo . getJavaCompilerVersion ( ) . wait ( ) ;
99+ this . $androidToolsInfo . validateJavacVersion ( javaCompilerVersion , { showWarningsAsErrors : true } ) . wait ( ) ;
103100 } ) . future < void > ( ) ( ) ;
104101 }
105102
@@ -167,14 +164,14 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
167164 }
168165 } ) ;
169166 } else {
170- this . $logger . printMarkdown ( ` As you are using Node.js \`${ this . sysInfoData . nodeVer } \` Static Binding Generator will be turned off.` +
167+ this . $logger . printMarkdown ( ` As you are using Node.js \`${ process . version } \` Static Binding Generator will be turned off.` +
171168 `Upgrade your Node.js to ${ AndroidProjectService . MIN_REQUIRED_NODEJS_VERSION_FOR_STATIC_BINDINGS } or later, so you can use this feature.` ) ;
172169 }
173170 } ) . future < any > ( ) ( ) ;
174171 }
175172
176173 private canUseStaticBindingGenerator ( ) : boolean {
177- return semver . gte ( this . sysInfoData . nodeVer , AndroidProjectService . MIN_REQUIRED_NODEJS_VERSION_FOR_STATIC_BINDINGS ) ;
174+ return semver . gte ( process . version , AndroidProjectService . MIN_REQUIRED_NODEJS_VERSION_FOR_STATIC_BINDINGS ) ;
178175 }
179176
180177 private useGradleWrapper ( frameworkDir : string ) : boolean {
0 commit comments