Android studio path windows

Android studio path windows

Android Studio — IDE для разработки приложений для Андроид от Google на основе IntelliJ IDEA.

Установка:
Страница загрузок на официальном сайте.
Windows:
Необходимо установить JDK и прописать системную переменную JAVA_HOME

Чтобы использовать Android Studio с эмулятором на Windows XP SP3 необходимо скачать и установить старую версию Intel Hardware Accelerated Execution Manager (extra_intel_haxm-windows_r02.zip)
extra_intel_haxm-windows_r02.zip ( 1,66 МБ )

OS X:
Установка Andoid Studio на OS X намного проще — необходимо проинсталировать JDK, а затем Android Studio.

Не запускается эмулятор

Запускается эмулятор, но появляется ошибка «pixel launcher isn’t responding»

При запуске эмулятора лаунчер сообщает: Pixel launcher isn’t responding. Ни какой реакции на нажатия.

Произошло на машине с встроенной видеокартой Intel HD Graphics 3000 — в Windows 10 драйвер не поддерживает OpenGL (вероятно связанно с этим).
Решение: в наcтройках AVD установить значение Software-GLES 2.0 для Emulated performance\Graphics

Решение: Изменить рендер на DirectX.

Создание быстрого x86 эмулятора Android (AVD) на примере Android 5.0.1 (API 21)

Запускаем Android SDK Manager. Загружаем Intel x86 Atom System Image (ознакомьтесь также с Using Hardware Acceleration, Как разогнать эмулятор Android )

Пользуемся

Изменение места хранения AVD. Инструкция.
Проверено на Ubuntu 16.04, Android Studio 3.0, все компоненты обновлены до последней версии (на 19.11.2017)

  • Если подчеркивает красным код, где используются ресурсы: R
  • После внезапного выключения компьютера, после перезапуска может быть во всех проектах весь код красным
  • Если Android Studio выдает приблизительно такую ошибку: Error:Execution failed for task ‘:app:dexDebug’
  • В сообщении об ошибке упоминается heap — виртуальная память
  • Android Studio пришет примерно такую ошибку: Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to «83648b99316049d63656d7276cb19cc7e95d70a5»
  • Иногда при подключении сторонних библиотек могут дублироваться некоторые файлы (обычно связанные с лицензированием). В сообщении будет что-то содержащее слова: duplicate files

  • Если при запуске эмулятора сообщение Cannot set up guest memory ‘pc.ram’: Invalid argument — проверьте в настройках эмулятора объем памяти, например установите 512 Мб.
  • Также быстро работает Android x86 в VirtualBox (Есть маркет в android-x86-4.2-20130228.iso)
  • Используйте в названиях файлов и каталогов только символы латинского алфавита.
  • Путь к файлу не должен превышать 256 символов.
  • Не используйте заглавные буквы — «Error:Execution failed for task ‘:app:mergeDebugResources’. Unsupported node ‘item’ in file «\powertool\app\src\main\res\menu\menu.xml» — была из-за заглавной буквы в «Menu» «

Учебники по Android Studio:

Renamed Properties in BuildTypes
runProguard => minifyEnabled
zipAlign => zipAlignEnabled
jniDebugBuild => jniDebuggable
renderscriptDebug => renderscriptDebuggable

Renamed Properties in ProductFlavors
flavorGroups => flavorDimensions
packageName => applicationId
testPackageName => testApplicationId
renderscriptSupportMode => renderscriptSupportModeEnabled
ProductFlavor.renderscriptNdkMode => renderscriptNdkModeEnabled

Т.е. например в build.gradle вместо runProguard false необходимо написать minifyEnabled true

Просьба: если вы автор последнего сообщения — просто редактируйте его, а не добавляйте новое.

Добавляем систему контроля версий Mercurial
Разработчики используют систему Mercurial для администрирования исходного кода. У нее два основных назначения:

  • Она хранит все предыдущие версии каждого файла
  • Она может объединить разные версии вашего кода, то есть сотрудники могут независимо работать над кодом и затем объединять свои изменения

О инсталляции и работе с Mercurial хорошо написано здесь:

  1. Hg Init: Часть 2. Основы Mercurial
  2. Hg Init: Часть 3. Привыкаем работать в команде

Устанавливаем Mercurial, если необходимо добавляем в %PATH% путь (в моем случае D:\Program Files\TortoiseHg\).
Запускаем в консоли из каталога проекта команду hg init — создает репозиторий.
Открываем проект в Android Studio — Studio обнаруживает Mercurial и предлагает добавить (add root).
Пользуемся — правая кнопка на вкладке открытого файла — Mercurial. Здесь те пункты, описанные в статье Hg Init: Часть 2. Основы Mercurial — Pull, Push, Commit и т.д.)

Создам информационную тему по Android Studio.
Android Studio — IDE для разработки приложений для Андроид от Google на основе IntelliJ IDEA.

Во время демонстрации Android Studio на Google IO пытался сразу найти и скачать, но видимо выложили в доступ позже.

Ошибка Abnormal build process termination после обновления до 0.2.1. — не обновляйте 0.2.0 до 0.2.1

избавится от проблемы удалось только вернувшись на 0.2.0 — удалить Android Studio через uninstal, затем удалить вручную каталог — там много остается.

Ошибки:
1. «You are using an old, unsupported version of
Gradle. Please use version 1.Х or greater.

2. Project is using an old version of the Android
Gradle plug-in. The minimum supported
version is 0.Х.X.

Решение О Android Studio

Ошибка Gradle project sync failed error — Решение

В теме нет куратора. По вопросам наполнения шапки обращайтесь к модераторам раздела через кнопку под сообщениями, на которые необходимо добавить ссылки.

Сообщение отредактировал derak1129 — 26.09.20, 17:13

How to set Java SDK path in AndroidStudio?

I had Java 1.7.0_21 installed and I installed 1.7.0_45 today after uninstalling the previous version. Now Android Studio has stopped compiling projects and says that it cant locate the 1.7.0_21 folder. How can I set the new path for Java SDK? I have changed the environment variables also but didn’t work.

8 Answers 8

Generally speaking, it is set in the «Project Structure» dialog.

Go to File > Project Structure > SDK Location. The third field is «JDK Location» where you can set it. This will set it for the current project.

To set the default for new projects, go to File > Other Settings > Default Project Structure > SDK Location and set the «JDK Location».

Older Versions

Go to File > Project Structure > [Platform Settings] > SDKs. You’ll need to either update you current SDK configuration to use the new directory, or define a new one and then change your project’s settings to use the new one. This will set it for the current project.

To set the default for new projects, go to File > Other Settings > Structure for New Projects > [Platform Settings] > SDKs and set the SDK to use when creating a new project.

Go to File> Project Structure (or press Ctrl+Alt+Shift+S), A popup will open now go to SDK Location Tab you will find JDK Location there refer this image to be more clear.

I tried updating all of my SDKs by just going into the Project Structure > Platform Settings > SDKs and changing the Java SDK, but that didn’t work, so I had to recreate the configurations from scratch.

Here’s how to create your SDKs with the latest Java:

  1. In Project Structure > Platform Settings > SDKs, click the «+» button to add a new SDK.
  2. In the pop-up, go into your Android SDK folder and click «Choose»
  3. Another pop-up will appear asking for which SDK and JDK you want to use. Choose any Android SDK and the 1.7 JDK.
  4. Go to Project Structure > Project Settings > Project and change your Project SDK to the one you just created. You should see the name of the SDK contain the new Java version that you installed.

Android Studio — How to Change Android SDK Path

When I open Android SDK Manager from Android Studio, the SDK Path displayed is:

I want to change this path. How do I do it?

29 Answers 29

From Android Studio 1.0.1

  1. File -> project Structure into Project Structure
  2. Left -> SDK Location
  3. SDK location select Android SDK location (old version use Press +, add another sdk)

For projects default:

  1. Close current Project (File->Close project)

You’ll get a Welcome to Android Studio Dialog. In that:

Click on Configure -> Project Defaults -> Project Structure

Click on SDK Location in the left column

Put the path to the Android SDK in «Android SDK location» field.

(Example SDK location: C:\android-sdk ; I have sub-folders like add-ons , platforms etc under C:\android-sdk )

Click OK to save changes

Following steps were for older versions(

From the quick start window, choose Configure, then choose Project Defaults, and then choose Project Structure. Then on the left under Platform Settings choose SDKs. Then to the right of that choose the current android platform, mine was Android 4.2.2 Platform, and delete it using the red minus button at the top, then add a new android platform using the green plus button at the top and point it to your current SDK folder and that is it.

I Configured in this way

Welcome to Android Studio Screen

Click Configure Then

Project Defaults and then Project Structure

Then Android SDK and Selected the path to my current location of Android SDK

Changing the sdk location in Project Settings will solve the problem partially. When Android Studio is used to download a new SDK, it will place the new SDK in the internal SDK folder (inside Android Studio).

Existing android developers will already have a large sdks folder (hereinafter referred to as external SDK folder) containing all the SDKs downloaded before Android Studio came around.

For Mac/Linux users though there is a good way out. Soft links!

Exit Android Studio and perform the following steps:

And we’re good to go. Launch SDK Manager after starting Android Studio, watch as it discovers all your existing SDKs like a charm :).

EUREKA I found it!

With the current Studio 1.3 each project has a local.properties file where you can edit the SDK!

Here’s how you can change the android sdk path in Android studio:

  1. Open your required android project in Android studio
  2. Click on the main project folder and press F4
  3. Now click on «SDKs» under Platform Settings (Left hand side of the dialog box)
  4. You should now see a plus sign on the top, click it and choose «Android SDK»
  5. Now you would be asked to choose the required SDK folder
  6. Select the required build target(if necessary) and click «ok»
  7. Now you should see the new entry in the list of SDKs
  8. Click «Modules» under Project Settings
  9. Select your project folder and in the Dropdown for «Module SDK», select the new SDK entry and click «apply»
  10. Now click «OK» and your done.

Note: If changes do not take effect, restarting android studio should fix the problem.

Make your life easy with shortcut keys
ctrl+shift+alt+S
or

by going to file->project structure:

it will open this window, where you can select your SDK

Try this way i try in Android Studio 2.0
Step 1: File->Setting
Step 2: Seting->SDK option
Step 3: Click Edit option in Sdk Location
Step 4: Show «SDK Components Setup»
Step 5: Click on Three «. » in «SDK Components Wizad»
Step 6: Select your new SDK Path

You can also create the environment variable (in Windows) ANDROID_HOME to the location of the Android SDK and Android Studio will use that.

I noticed that the latest version of Android Studio doesn’t seem to have the option «SDKs» path that’s mentioned in many of the answers. I’m guessing that disappeared in one of the updates, somewhere down the line?

The way i solved this issue (osx) was:

  1. Go to Project Settings (Cmd + ;)
  2. In SDK Location make sure you’re pointing to the correct SDK location (typically /Applications/Android Studio.app/sdk) then hit Apply
  3. Most important step — hit «Sync Project with Gradle files»

I wasn’t doing Step 3 and that was throwing me off. After a sync all your source r belong to us.

goto menu File->Project Strucurt or key Ctrl + Alt + Shift + S

Above answers are pretty correct, but some times Android Studio, does not like to refresh after SDK path change, a quick solution is to make some change in you Build file, and click on Sync. It will refresh you project.

While first installation There are two situations either you have pre-installed Android SDK if you had used it in past or you have nothing at all, At a time of installation Installer always ask user how you want to configure SDK with your studio.

You can simply give a path here or browse folder where sdk is available in local system. If you already have SDK, Another option as shown in below picture at Left down corner there is a nice option for download SDK, by clicking it you can download SDK with latest release right from there,You can also use third option see in right down corner setup Android SDK for me by clicking it you can step by step set your sdk.

Although you can also set it up when Android shows you list of available projects, a starting prompt window shown below

That’s pretty easy, and also sometime if you want to change your SDK you can always change it right in your Android Studio from

On windows system File —> Project Structure and then you will see SDK Location Option and from there you can set it up by providing a path or by browse it.

Or if you are on MAC system then from Platform settings.

Читайте также:  Случайно удаленные файлы можно восстановить стандартные средства windows если они были удалены
Оцените статью