merged development with conflicts....
This commit is contained in:
@@ -1,4 +1,11 @@
|
|||||||
0.9.0 (work in progress)
|
0.9.1:
|
||||||
|
- Added an AVD creation wizard to ADT. It is automatically displayed during a launch if no compatible AVDs are found.
|
||||||
|
- Fixed issue with libs/ folder where files with no extension would prevent the build from finishing.
|
||||||
|
- Improved error handling during the final steps of the build to mark the project if an unexpected error prevent the build from finishing.
|
||||||
|
- Fixed issue when launching ADT on a clean install would trigger org.eclipse.swt.SWTError: Not implemented [multiple displays].
|
||||||
|
|
||||||
|
|
||||||
|
0.9.0:
|
||||||
- Projects now store generated Java files (R.java/Manifest.java and output from aidl) in a 'gen' source folder.
|
- Projects now store generated Java files (R.java/Manifest.java and output from aidl) in a 'gen' source folder.
|
||||||
- Support for the new Android SDK with support for multiple versions of the Android platform and for vendor supplied add-ons.
|
- Support for the new Android SDK with support for multiple versions of the Android platform and for vendor supplied add-ons.
|
||||||
* New Project Wizard lets you choose which platform/add-on to target.
|
* New Project Wizard lets you choose which platform/add-on to target.
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
Compiling and deploying the Android Development Toolkit (ADT) feature.
|
|
||||||
|
|
||||||
The ADT feature is composed of four plugins:
|
|
||||||
- com.android.ide.eclipse.adt:
|
|
||||||
The ADT plugin, which provides support for compiling and debugging android
|
|
||||||
applications.
|
|
||||||
- com.android.ide.eclipse.common:
|
|
||||||
A common plugin providing utility services to the other plugins.
|
|
||||||
- com.android.ide.eclipse.editors:
|
|
||||||
A plugin providing optional XML editors.
|
|
||||||
- com.android.ide.eclipse.ddms:
|
|
||||||
A plugin version of the tool DDMS
|
|
||||||
|
|
||||||
Each of these live in development/tools/eclipse/plugins/
|
|
||||||
|
|
||||||
2 Features are used to distribute the plugins:
|
|
||||||
ADT, which contains ADT, ddms, common
|
|
||||||
Editors, which contains Editors, and requires the ADT feature.
|
|
||||||
|
|
||||||
The feature projects are located in development/tools/eclipse/features/
|
|
||||||
|
|
||||||
Finally 2 site projects are located in development/tools/eclipse/sites/
|
|
||||||
internal: is a site containing the features mentioned above as well as a test feature.
|
|
||||||
external: contains only the ADT and Editors features.
|
|
||||||
|
|
||||||
|
|
||||||
Basic requirements to develop on the plugins:
|
|
||||||
- Eclipse 3.3 or 3.4 with JDT and PDE.
|
|
||||||
|
|
||||||
|
|
||||||
----------------------------------
|
|
||||||
1- Loading the projects in Eclipse
|
|
||||||
----------------------------------
|
|
||||||
|
|
||||||
The plugins projects depend on jar files located in the Android source tree,
|
|
||||||
or, in some cases, built by the Android source.
|
|
||||||
|
|
||||||
Also, some source code (ddms) is located in a different location and needs to
|
|
||||||
be linked into the DDMS plugin source.
|
|
||||||
|
|
||||||
To automatize all of this, cd into development/tools/eclipse/scripts/
|
|
||||||
and run create_all_symlinks.sh
|
|
||||||
|
|
||||||
Once this has been done successfully, use the import project action in Eclipse
|
|
||||||
and point it to development/tools/eclipse. It will find all the projects in the
|
|
||||||
sub folder.
|
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------
|
|
||||||
2- Launching/Debugging the plugins from Eclipse
|
|
||||||
-----------------------------------------------
|
|
||||||
|
|
||||||
- Open Debug Dialog.
|
|
||||||
- Create an "Eclipse Application" configuration.
|
|
||||||
- in the "Plug-ins" tab, make sure the plugins are selected (you may
|
|
||||||
want to disable the test plugin if you just want to run ADT)
|
|
||||||
|
|
||||||
-----------------------------
|
|
||||||
3- Building a new update site
|
|
||||||
-----------------------------
|
|
||||||
|
|
||||||
- From Eclipse, open the site.xml of the site project you want to build and click
|
|
||||||
"Build All" from the "Site Map" tab.
|
|
||||||
@@ -35,6 +35,7 @@ import com.android.ide.eclipse.adt.launch.DeviceChooserDialog.DeviceChooserRespo
|
|||||||
import com.android.ide.eclipse.adt.project.ApkInstallManager;
|
import com.android.ide.eclipse.adt.project.ApkInstallManager;
|
||||||
import com.android.ide.eclipse.adt.project.ProjectHelper;
|
import com.android.ide.eclipse.adt.project.ProjectHelper;
|
||||||
import com.android.ide.eclipse.adt.sdk.Sdk;
|
import com.android.ide.eclipse.adt.sdk.Sdk;
|
||||||
|
import com.android.ide.eclipse.adt.wizards.actions.AvdManagerAction;
|
||||||
import com.android.ide.eclipse.common.project.AndroidManifestParser;
|
import com.android.ide.eclipse.common.project.AndroidManifestParser;
|
||||||
import com.android.ide.eclipse.common.project.BaseProjectHelper;
|
import com.android.ide.eclipse.common.project.BaseProjectHelper;
|
||||||
import com.android.prefs.AndroidLocation.AndroidLocationException;
|
import com.android.prefs.AndroidLocation.AndroidLocationException;
|
||||||
@@ -64,6 +65,9 @@ import org.eclipse.jdt.launching.JavaRuntime;
|
|||||||
import org.eclipse.jface.dialogs.Dialog;
|
import org.eclipse.jface.dialogs.Dialog;
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
import org.eclipse.jface.dialogs.MessageDialog;
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
|
import org.eclipse.jface.window.Window;
|
||||||
|
import org.eclipse.swt.widgets.Display;
|
||||||
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -465,17 +469,7 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
|
|||||||
|
|
||||||
// we are going to take the closest AVD. ie a compatible AVD that has the API level
|
// we are going to take the closest AVD. ie a compatible AVD that has the API level
|
||||||
// closest to the project target.
|
// closest to the project target.
|
||||||
AvdInfo[] avds = avdManager.getValidAvds();
|
AvdInfo defaultAvd = findMatchingAvd(avdManager, projectTarget);
|
||||||
AvdInfo defaultAvd = null;
|
|
||||||
for (AvdInfo avd : avds) {
|
|
||||||
if (projectTarget.isCompatibleBaseFor(avd.getTarget())) {
|
|
||||||
if (defaultAvd == null ||
|
|
||||||
avd.getTarget().getApiVersionNumber() <
|
|
||||||
defaultAvd.getTarget().getApiVersionNumber()) {
|
|
||||||
defaultAvd = avd;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (defaultAvd != null) {
|
if (defaultAvd != null) {
|
||||||
response.setAvdToLaunch(defaultAvd);
|
response.setAvdToLaunch(defaultAvd);
|
||||||
@@ -487,13 +481,48 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
|
|||||||
continueLaunch(response, project, launch, launchInfo, config);
|
continueLaunch(response, project, launch, launchInfo, config);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// FIXME: ask the user if he wants to create a AVD.
|
AdtPlugin.printToConsole(project, String.format(
|
||||||
// we found no compatible AVD.
|
"Failed to find an AVD compatible with target '%1$s'.",
|
||||||
AdtPlugin.printErrorToConsole(project, String.format(
|
|
||||||
"Failed to find an AVD compatible with target '%1$s'. Launch aborted.",
|
|
||||||
projectTarget.getName()));
|
projectTarget.getName()));
|
||||||
stopLaunch(launchInfo);
|
|
||||||
return;
|
final Display display = AdtPlugin.getDisplay();
|
||||||
|
final int[] result = new int[] { Window.CANCEL };
|
||||||
|
// ask the user to create a new one.
|
||||||
|
display.syncExec(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
Shell shell = display.getActiveShell();
|
||||||
|
if (MessageDialog.openQuestion(shell, "AVD Error",
|
||||||
|
"No Compatible targets were found. Do you wish to create one?")) {
|
||||||
|
AvdManagerAction action = new AvdManagerAction();
|
||||||
|
action.run(null /*action*/);
|
||||||
|
result[0] = action.getDialogResult();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (result[0] == Window.CANCEL) {
|
||||||
|
AdtPlugin.printErrorToConsole(project, String.format("Launch aborted."));
|
||||||
|
stopLaunch(launchInfo);
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
// attempt to reload the AVDs and find one compatible.
|
||||||
|
defaultAvd = findMatchingAvd(avdManager, projectTarget);
|
||||||
|
|
||||||
|
if (defaultAvd == null) {
|
||||||
|
AdtPlugin.printErrorToConsole(project, String.format(
|
||||||
|
"Still no compatible AVDs with target '%1$s': Aborting launch.",
|
||||||
|
projectTarget.getName()));
|
||||||
|
stopLaunch(launchInfo);
|
||||||
|
} else {
|
||||||
|
response.setAvdToLaunch(defaultAvd);
|
||||||
|
|
||||||
|
AdtPlugin.printToConsole(project, String.format(
|
||||||
|
"Launching new emulator with compatible AVD '%1$s'",
|
||||||
|
defaultAvd.getName()));
|
||||||
|
|
||||||
|
continueLaunch(response, project, launch, launchInfo, config);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (hasDevice == false && compatibleRunningAvds.size() == 1) {
|
} else if (hasDevice == false && compatibleRunningAvds.size() == 1) {
|
||||||
Entry<IDevice, AvdInfo> e = compatibleRunningAvds.entrySet().iterator().next();
|
Entry<IDevice, AvdInfo> e = compatibleRunningAvds.entrySet().iterator().next();
|
||||||
@@ -557,6 +586,26 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param avdManager
|
||||||
|
* @param projectTarget
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private AvdInfo findMatchingAvd(AvdManager avdManager, final IAndroidTarget projectTarget) {
|
||||||
|
AvdInfo[] avds = avdManager.getValidAvds();
|
||||||
|
AvdInfo defaultAvd = null;
|
||||||
|
for (AvdInfo avd : avds) {
|
||||||
|
if (projectTarget.isCompatibleBaseFor(avd.getTarget())) {
|
||||||
|
if (defaultAvd == null ||
|
||||||
|
avd.getTarget().getApiVersionNumber() <
|
||||||
|
defaultAvd.getTarget().getApiVersionNumber()) {
|
||||||
|
defaultAvd = avd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return defaultAvd;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Continues the launch based on the DeviceChooser response.
|
* Continues the launch based on the DeviceChooser response.
|
||||||
|
|||||||
@@ -144,8 +144,6 @@ class AvdManagerListPage extends WizardPage {
|
|||||||
* Creates the AVD selector and refresh & delete buttons.
|
* Creates the AVD selector and refresh & delete buttons.
|
||||||
*/
|
*/
|
||||||
private void createAvdGroup(Composite parent) {
|
private void createAvdGroup(Composite parent) {
|
||||||
int col = 0;
|
|
||||||
|
|
||||||
final Composite grid2 = new Composite(parent, SWT.NONE);
|
final Composite grid2 = new Composite(parent, SWT.NONE);
|
||||||
grid2.setLayout(new GridLayout(2, false /*makeColumnsEqualWidth*/));
|
grid2.setLayout(new GridLayout(2, false /*makeColumnsEqualWidth*/));
|
||||||
grid2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
grid2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
HOW TO PACKAGE THE SOURCE OF THE PLUGINS FOR RELEASE.
|
|
||||||
|
|
||||||
Note: this is only useful before we move to the public source repository, after which this will
|
|
||||||
be obsolete.
|
|
||||||
|
|
||||||
The source archive must contains:
|
|
||||||
1/ Source of the EPL plugins that are released.
|
|
||||||
2/ Any closed source dependencies that were created by Google.
|
|
||||||
3/ The readme file explaining how to build the plugins.
|
|
||||||
|
|
||||||
|
|
||||||
1/ PLUGIN SOURCE
|
|
||||||
|
|
||||||
The Plugins that are currently released and that are EPL are:
|
|
||||||
- Android Developer Tools => com.android.ide.eclipse.adt
|
|
||||||
- Common => com.android.ide.eclipse.common
|
|
||||||
- Android Editors => com.android.ide.eclipse.editors
|
|
||||||
|
|
||||||
All three plugins are located in
|
|
||||||
device/tools/eclipse/plugins/
|
|
||||||
|
|
||||||
Before packing them up, it is important to:
|
|
||||||
- remove the bin directory if it exists
|
|
||||||
- remove any symlinks to jar files from the top level folder of each plugin
|
|
||||||
|
|
||||||
2/ PLUGIN DEPENDENCIES
|
|
||||||
|
|
||||||
The plugin dependencies are jar files embedded in some of the plugins. Some of those jar files
|
|
||||||
are android libraries for which the source code is not yet being released (They will be released
|
|
||||||
under the APL).
|
|
||||||
|
|
||||||
Those libraries are not part of the SDK, and need to be taken from a engineering build.
|
|
||||||
They will be located in
|
|
||||||
device/out/host/<platform>/framework/
|
|
||||||
|
|
||||||
The libraries to copy are:
|
|
||||||
- layoutlib_api.jar
|
|
||||||
- layoutlib_utils.jar
|
|
||||||
- ninepatch.jar
|
|
||||||
|
|
||||||
They should be placed in a "libs" folder in the source archive.
|
|
||||||
|
|
||||||
3/ README
|
|
||||||
|
|
||||||
In the source archive, at the top level, needs to be present a file explaining how to compile
|
|
||||||
the plugins.
|
|
||||||
|
|
||||||
This file is located at:
|
|
||||||
device/tools/eclipse/plugins/README.txt
|
|
||||||
Reference in New Issue
Block a user