This is definitively somewhere we want to go.
I haven't looked at your code and can't unless you upload it for review.
I think the UI should probably display the available platforms and let
the user choose which one(s) to install.
Creating a default AVD is a tricky business, there's too many open
preferences, so I would probably leave that out for now and focus on
installing the tools, and platform(s).
Are you re-using classes of sdklib.jar to do the actual install?
Xav
--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
Please do not send me questions directly. Thanks!
Always master.
> I have created some AVD, because Hello World cheat sheet requires at
> least one AVD.
> The user can select to doesn't create it.
> IMO, this cheat sheet looks great for beginners. Please look at
> http://screencast.com/t/ODYxNTk5Z.
> I also planned to add NotePad tutorial.
> Would you like me to add the Hello world cheat sheet at all ?
>
> BTW Intelli jIDEA Android plugin create AVD when it is required.
I agree that we should improve that workflow. However, creating a
random AVD that may not be the one the user choose is not necessarily
the right thing to do, imo.
While I do realize it would be nice to not have to think about Android
targets when starting Android development, I think it might be a
disservice to beginners to completely hide this from them (even if
it's just at first).
I'd rather have a wizard of sort that drives them while making their
first AVD. This wizard could pop-up the first time an AVD is needed
and there isn't one.
>> Are you re-using classes of sdklib.jar to do the actual install?
>>
>
> Yes, I have added sdklib.jar and sdkuilib.jar to my plugin. I need
> both sdklib.jar and sdkuilib.jar because ADT doesn't export these
> packages.
> Could I make this feature in separate plugin or integrate to ADT? If
> you want me to make separate plugin can I add export packages
> declaration for sdk and sdkui in ADT's manifest ?
inside ADT would be fine.
> BTW It would be nice if it is possible to have tools r8 zip before
> releasing. I can make it and if it is same as tools in repository,
> then it isn't necessary.
I'm not sure what you need there?
Xav
Hmm this is kind of cool. We would probably need to have our doc
writers take a look at the content though (unless you grabbed it from
developer.android.com already?)
>>> BTW It would be nice if it is possible to have tools r8 zip before
>>> releasing. I can make it and if it is same as tools in repository,
>>> then it isn't necessary.
>
>>I'm not sure what you need there?
>
> I found Tools SDK in Google repository (https://dl-ssl.google.com/
> android/repository/repository.xml) and parsed file with RepoSource
> class.
> Google repository contains the tools_r07-<OS>.zip. This file is
> similar to http://dl.google.com/android/android-sdk_r07-<OS>.zip, but
> they aren't same.
> https://dl-ssl.google.com/android/repository/tools_r07-<OS>.zip
> contains only the tools directory and I have to create the platforms,
> add-ons and temp directories in order to install the latest platform
> SDK. It works fine for Tools SDK 7 because these directories are
> empty . However, Tools 8 changes this structure (there is the platform-
> tools directory and it isn't empty). I know the structure of Tools SDK
> which built from source (https://dl-ssl.google.com/android/repository/
> tools_r08-<OS>.zip), but I don't know what will you set to
> https://dl-ssl.google.com/android/repository/tools_r08-<OS>.zip when
> Tools SDK 8 be released.
> Because of that I can't make reliable test for Tools SDK 8. I suppose
> that ToolArchive.install(...) will make correct structure, but it
> would be nice when I could test it before releasing.
ah I see, and that's a good point.
The file at http://dl.google.com/android/android-sdk_r07-<OS>.zip is
the full archive, meant to be manually downloaded, while anything in
the repo is only the component itself, thus the tools folder only.
First, we should download from the repository always.
Then, I think we may update the SDK Updater part to create folder if
they don't exist (if it doesn't already do it, I'd have to check).
All you should do is create the main SDK folder and install stuff into it.
- tools, docs and platform-tools should be installed always, no need
to show these packages to the user.
- platforms, add-ons, samples should be selectable by the user.
ah I see, and that's a good point.
The file at http://dl.google.com/android/android-sdk_r07-<OS>.zip is
the full archive, meant to be manually downloaded, while anything in
the repo is only the component itself, thus the tools folder only.
Then, I think we may update the SDK Updater part to create folder if
they don't exist (if it doesn't already do it, I'd have to check).
All you should do is create the main SDK folder and install stuff into it.
- tools, docs and platform-tools should be installed always, no need
to show these packages to the user.
- platforms, add-ons, samples should be selectable by the user.
toolArchive.install(sdkFolder ...) unpacks
https://dl-ssl.google.com/android/repository/tools_r07-<OS>.zip to the
$sdkFolder/tools directory.
It is easy because SDK Tools 7 have content in only one directory (tools)
Tools SDK 8 have content in tools and platform-tools directories. I
hope that calling
toolArchive.install(sdkFolder...) will unpack Tools SDK content correctly to :
$sdkFolder/tools and $sdkFolder/platform-tools
If it would be work on this way, I won't have to change code after
releasing SDK Tools. SDK Updater would be have to do that. It have to
update tools and platform-tools.
Other folder are empty and they can be created.
Anyway, I will create a change with this assumption. It could be
change when SDK tools 8 be released.
Regards,
Peco
The platform-tools folder will be its own component. The tools package
from the repository will not contain the platform-tools.
So all you have to do is download both the tools component and the
platform-tools component.
Xav
--