Check if Android SDK package is installed programmatically

前端 未结 2 1406
忘了有多久
忘了有多久 2021-01-11 14:29

I\'m making an alternative for the GUI stand-alone SDK Manager (it\'s gone on Android SDK 25), I\'ve found in Android Studio the required XMLs to retrieve packages.

2条回答
  •  暖寄归人
    2021-01-11 14:44

    You must do 2 separate work to done:

    1. Parse giving xmls from urls like (https://dl.google.com/android/repository/repository2-1.xml)
    2. Read files description in every folder in your SDK path

    for example: in C:\Program Files (x86)\Android\android-sdk\platforms\android-23 in my laptop there is file with source.properties name with following contents:

    Pkg.Desc=Android SDK Platform 6.0
    Pkg.UserSrc=false
    Platform.Version=6.0
    Platform.CodeName=
    Pkg.Revision=3
    AndroidVersion.ApiLevel=23
    Layoutlib.Api=16
    Layoutlib.Revision=3
    Platform.MinToolsRev=22
    

    there is source.properties file in every folder. I hope this helps you ;)

提交回复
热议问题