Showing posts with label Visual Studio 2017. Show all posts
Showing posts with label Visual Studio 2017. Show all posts

Tuesday, 8 January 2019

compilesdkversion 'android-26' requires jdk 1.8 or later to compile visual studio


You are getting the build error in the Android Apache Cordova.

>compilesdkversion 'android-26' requires jdk 1.8 or later to compile visual studio

You  are getting this error as your application is not pointing to the valid version of the  java SDK (JDK) 

You need to set the JAVA SDK version from below screen in visual Studio.

Tools > Option > Tools for Apache Cordova  > Environment Variable Override

failed to find target with hash string 'android-26' in: C:\ProgramData\Microsoft\AndroidSDK\25



You are getting the below issue, which is build error from android cordova application

* What went wrong:
> failed to find target with hash string 'android-26' in: C:\ProgramData\Microsoft\AndroidSDK\25


It is happening as you have not installed the particular image which your application is pointing to. You are missing the image where your android SDK is present as 

C:\ProgramData\Microsoft\AndroidSDK\25
You are having the android SDK version mentioned in Build.Gradle as like below.
ext {
    apply from: 'cordova.gradle'
    cdvCompileSdkVersion = 26 //privateHelpers.getProjectTarget()
    cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools()
}