sdk.git has been reorganized, please read if you edit & build the SDK

42 views
Skip to first unread message

Raphaël Moll

unread,
Mar 14, 2013, 3:31:15 PM3/14/13
to adt...@googlegroups.com
Hi folks,

If you don't checkout and build the SDK from sdk.git, you can skip this.

If you do, you will notice that several projects have vanished from sdk.git. Instead I've moved them to tools/base.git and tools/swt.git.
If you have some of these projects open in Eclipse, here's what do to:

--1- first, remove the Eclipse projects that have moved from your workspace --  Eclipse *will* get confused when they vanish on disk but are still open in the IDE (eclipse will try to auto-recreate the directory/.project file). So clean your workspace of the following projects, if you have them imported: 
- ant-task
- archquery
- assetsstudio
- chimpchat
- common
- ddms, ddmuilib
- device_validator
- draw9patch
- hierarchyviewer2 + lib
- layoutlib_api
- lint (cli + libs)
- monkeyruner
- ninepatch
- rule_api
- screenshot
- sdk_common
- sdkmanager, sdkuilib
- sdkstats
- traceview
- uiautomatorviewer

Chances are you don't have all these projects open in eclipse like I do, so just remove the ones that matter to you.
Note that you'll loose your launch configuration if you have any, so make sure to write down their details to restore them after.

--2- If you don't have tools/base and tools/swt in your checkout repo, do this:
$ repo init -g all,-notdefault,tools
$ repo sync

this will not force a full sync, just add the missing tools/xyz directories. It might give you a couple more irrelevant directories, There are ways to trim it, but unless you're really short on disk space it's not worth it.

Make sure you have a $ROOT/prebuilts/devtools/tools/lib directory with a packet full of jars inside.


--3- if you build ADT or other plugins, make sure to run this after your sync:
$ . build/envsetup.sh
$ lunch sdk-eng
$ rm ./sdk/eclipse/plugins/com.android.ide.eclipse.*/libs/*.jar
$ ./sdk/eclipse/scripts/create_all_symlinks.sh

That removes the jar files linked to under the plugins and replaces them by new prebuilt versions which come from prebuilts/devtools.


--4- Finally you can reopen eclipse and reimport the projects from tools/base or tools/swt; or built adt as usual from the command line. 

--5- Caution: When you build ADT or the SDK, it uses the JARs from prebuilts/devtools instead of running make. That makes it easier to build the SDK for people who do not modify the libs (the common case).
If you actually need to modify the libs (sdklib, etc.) used by adt or the SDK, there's an extra step to run to update the jars in prebuilts/devtools. We plan to simplify this part but it's work-in-progress. Ask me for details.

HTH. 
R/

Reply all
Reply to author
Forward
0 new messages