Jump to content

Eclipse: Konfigurasi SDK: Difference between revisions

From Wiki
Created page with "First thing first, you need to download Android SDK for Linux [http://developer.android.com/sdk/index.html here]. It's around 80MB so it might take a while to download. Once downloaded, run the following commands:<syntaxhighlight lang="bash"> sudo cp -r android-sdk_r20.0.1-linux.tgz /opt </syntaxhighlight><syntaxhighlight lang="bash"> cd /opt </syntaxhighlight><syntaxhighlight lang="bash"> sudo tar xvzf android-sdk_r20.0.1-linux.tgz </syntaxhighlight><syntaxhighlight lan..."
 
No edit summary
 
Line 1: Line 1:
First thing first, you need to download Android SDK for Linux [http://developer.android.com/sdk/index.html here]. It's around 80MB so it might take a while to download. Once downloaded, run the following commands:<syntaxhighlight lang="bash">
This page provides step-by-step instructions for how to provision a dedicated development environment for the complete set of projects that comprise the Eclipse Platform's SDK, i.e., the projects used to build the downloads of the Eclipse Platform Project. The provisioning process is entirely automated, except for course from user input to choose configurable options, e.g., where in the file system to place the installation, but even for these, defaults are provided.
sudo cp -r android-sdk_r20.0.1-linux.tgz /opt
 
</syntaxhighlight><syntaxhighlight lang="bash">
If you encounter problems or have suggestions for improvements, please use Bug 536533 for that purpose.
cd /opt
 
</syntaxhighlight><syntaxhighlight lang="bash">
== Launch the Eclipse Installer ==
sudo tar xvzf android-sdk_r20.0.1-linux.tgz
If you don't already have the [https://wiki.eclipse.org/Eclipse_Installer Eclipse Installer] on your system, [https://wiki.eclipse.org/Eclipse_Installer download] the installer that is appropriate for your operating system's architecture. For Windows, the installer is distributed as an executable. It will start without a JRE or JDK installed, but if you don't have at Java 8 installed, it will guide you to install that. For Mac and Linux, you must unpack the installer before you can run the application. In all cases, you must install a JRE or JDK (currently at least Java 8) before you can successfully use the installer, and of course the installation you will create needs it too. Please look at [https://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM these instructions] if you need further details. And note that on Mac you must install a JDK, not merely a JRE.
</syntaxhighlight><syntaxhighlight lang="bash">
 
sudo chmod -R 755 /opt/android-sdk-linux
The latest version if the installer can be registered to automatically launch when clicking on a hyperlink. This can be used to further automate the initial steps in this tutorial. As such, you can open this link in a new tab to configure the installer to launch automatically.
</syntaxhighlight>Then run the SDK Manager to download necessary libraries and APIs:<syntaxhighlight lang="bash">
 
cd /opt/android-sdk-linux/tools
Now launch the installer application. Unless you just downloaded a new installer, the one you have probably needs to be updated. In simple mode, you'll see a "!" indicator on the menu button in the upper right corner; the menu will have an update item to start an update:<blockquote>Note that the installer will by default use a shared bundle pool for creating installations. This defaults to the .p2 folder in the home folder. If the file system for the home folder is relatively small, you can change the default location using the Bundle Pools menu option in simple mode, or the right-most toolbar button in the Bundle Pool section in advanced mode, as seen in each of the corresponding screen captures in the following section.</blockquote>Note also that you can choose which Java VM is used by the installation you are about to create. The installer will generally detected the JREs and JDKs installed on your system, choosing an appropriate default, and remembering it for the next time you use the installer. But failing that, the installer will stay on the product page and you must use the tool button to locate a Java VM that is suitable for the installation being created.
</syntaxhighlight><syntaxhighlight lang="bash">
 
sudo ./android sdk
== Apply the Platform SDK Configuration ==
</syntaxhighlight>Well, if you want to develop Android application for Android 2.3.3 then you should Android 2.3.3 (API 10). For further information about Android platforms and packages please click [http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/heliossr2 here].
We will use a so-called Oomph [https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Automation_and_Specialization_with_Configurations configuration] to automate the selection of the product and projects to provision.
 
If you've registered the installer to launch automatically for links with scheme <code>eclipse+install</code> as described in the previous section, you can open [https://www.eclipse.org/setups/installer/?url=https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.releng.aggregator/master/oomph/PlatformSDKConfiguration.setup&show=true this link] in a new tab and click the <code>Launch...</code> button on that page. Doing so automates the following equivalent alternative steps.
 
Drag and drop the Platform SDK Configuration link on the title area of the installer. If the installer is in simple mode, it will ask to Switch to Advanced Mode; confirm that prompt. When the configuration is successfully applied, the installer will be in advanced mode and will automatically turn to the Variables page.
 
NOTE: Drag and drop does not work reliable on Linux, please use the next approach if you are also facing this.
 
As an alternative to drag-and-drop, you can copy the [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.releng.aggregator/master/oomph/PlatformSDKConfiguration.setup Platform SDK Configuration] link, and apply it to the installer. In simple mode, this is done via the menu action; this action will appear in the menu only if the clipboard contains a valid configuration:


== Source ==
== Source ==


* [https://www.ubuntubuzz.com/2012/08/how-to-setup-android-sdk-with-eclipse.html ubuntubuzz.com]
* [https://wiki.eclipse.org/Eclipse_Platform_SDK_Provisioning eclipse.org]

Latest revision as of 02:21, 22 March 2023

This page provides step-by-step instructions for how to provision a dedicated development environment for the complete set of projects that comprise the Eclipse Platform's SDK, i.e., the projects used to build the downloads of the Eclipse Platform Project. The provisioning process is entirely automated, except for course from user input to choose configurable options, e.g., where in the file system to place the installation, but even for these, defaults are provided.

If you encounter problems or have suggestions for improvements, please use Bug 536533 for that purpose.

Launch the Eclipse Installer

If you don't already have the Eclipse Installer on your system, download the installer that is appropriate for your operating system's architecture. For Windows, the installer is distributed as an executable. It will start without a JRE or JDK installed, but if you don't have at Java 8 installed, it will guide you to install that. For Mac and Linux, you must unpack the installer before you can run the application. In all cases, you must install a JRE or JDK (currently at least Java 8) before you can successfully use the installer, and of course the installation you will create needs it too. Please look at these instructions if you need further details. And note that on Mac you must install a JDK, not merely a JRE.

The latest version if the installer can be registered to automatically launch when clicking on a hyperlink. This can be used to further automate the initial steps in this tutorial. As such, you can open this link in a new tab to configure the installer to launch automatically.

Now launch the installer application. Unless you just downloaded a new installer, the one you have probably needs to be updated. In simple mode, you'll see a "!" indicator on the menu button in the upper right corner; the menu will have an update item to start an update:

Note that the installer will by default use a shared bundle pool for creating installations. This defaults to the .p2 folder in the home folder. If the file system for the home folder is relatively small, you can change the default location using the Bundle Pools menu option in simple mode, or the right-most toolbar button in the Bundle Pool section in advanced mode, as seen in each of the corresponding screen captures in the following section.

Note also that you can choose which Java VM is used by the installation you are about to create. The installer will generally detected the JREs and JDKs installed on your system, choosing an appropriate default, and remembering it for the next time you use the installer. But failing that, the installer will stay on the product page and you must use the tool button to locate a Java VM that is suitable for the installation being created.

Apply the Platform SDK Configuration

We will use a so-called Oomph configuration to automate the selection of the product and projects to provision.

If you've registered the installer to launch automatically for links with scheme eclipse+install as described in the previous section, you can open this link in a new tab and click the Launch... button on that page. Doing so automates the following equivalent alternative steps.

Drag and drop the Platform SDK Configuration link on the title area of the installer. If the installer is in simple mode, it will ask to Switch to Advanced Mode; confirm that prompt. When the configuration is successfully applied, the installer will be in advanced mode and will automatically turn to the Variables page.

NOTE: Drag and drop does not work reliable on Linux, please use the next approach if you are also facing this.

As an alternative to drag-and-drop, you can copy the Platform SDK Configuration link, and apply it to the installer. In simple mode, this is done via the menu action; this action will appear in the menu only if the clipboard contains a valid configuration:

Source