private void loadSDKToolsMajorVersion ( ) { File propFile = new File ( sdkPath , "tools/" + SOURCE_PROPERTIES_FILENAME ) ; Properties properties = new Properties ( ) ; try { properties . load ( new FileInputStream ( propFile ) ) ; } catch ( IOException e ) { throw new InvalidSdkException ( "Error reading " + propFile . getAbsoluteFile ( ) ) ; } if ( properties . containsKey ( SDK_TOOLS_REVISION_PROPERTY ) ) { try { String versionString = properties . getProperty ( SDK_TOOLS_REVISION_PROPERTY ) ; String majorVersion ; if ( versionString . matches ( ".*[\\.| ].*" ) ) { String [ ] versions = versionString . split ( "[\\.| ]" ) ; majorVersion = versions [ 0 ] ; } else { majorVersion = versionString ; } sdkMajorVersion = Integer . parseInt ( majorVersion ) ; } catch ( NumberFormatException e ) { throw new InvalidSdkException ( "Error - The property '" + SDK_TOOLS_REVISION_PROPERTY + "' in the SDK source.properties file number is not an Integer: " + properties . getProperty ( SDK_TOOLS_REVISION_PROPERTY ) ) ; } } }
Loads the SDK Tools version