Visual studio code android apk

Android

adelphes

Android for VS Code

This is a preview version of the Android for VS Code Extension. The extension allows developers to install, launch and debug Android Apps from within the VS Code environment.

What’s New

  • Java Intellisense for Android is now in beta.

Features

  • Line by line code stepping
  • Breakpoints
  • Variable inspection and modification
  • Logcat viewing [ Command Palette -> Android: View Logcat ]
  • Break on exceptions
  • Step through Android sources

Requirements

You must have Android SDK Platform Tools installed. This extension communicates with your device via the ADB (Android Debug Bridge) interface.

You are not required to have Android Studio installed — if you have Android Studio installed, make sure there are no active instances of it when using this extension or you may run into problems with ADB.

Limitations

  • This is a preview version so expect the unexpected. Please log any issues you find on GitHub.
  • This extension will not build your app.
    If you use gradle (or Android Studio), you can build your app from the command-line using ./gradlew assembleDebug or configure a VSCode Build Task to run the command (see below).

You must use gradle or some other build procedure to create your APK. Once built, the extension can deploy and launch your app, allowing you to debug it in the normal way. See the section below on how to configure a VSCode Task to automatically build your app before launching a debug session.

  • Some debugger options are yet to be implemented. You cannot set conditional breakpoints and watch expressions must be simple variables.
  • If you require a must-have feature that isn’t there yet, let us know on GitHub.
Читайте также:  Живые обои с красивыми девушками для андроид

Extension Settings

This extension allows you to debug your App by creating a new Android configuration in launch.json .
The following settings are used to configure the debugger:

Building your app automatically

This extension will not build your App. If you would like to run a build each time a debug session is started, you can add a preLaunchTask option to your launch.json configuration which invokes a build task.

.vscode/launch.json

Add a preLaunchTask item to the launch configuration:

Add a new task to run the build command:

.vscode/tasks.json

Java Intellisense

Support for Java Intellisense is currently in beta, so any feedback is appreciated.

To use Java intellisense, make sure the option is enabled in Settings (Extensions > Android > Enable Java language support for Android) and press ctrl/cmd-space when editing a Java source file.

You can read more about using code-completion on the VSCode website and how to configure code-completion to suit your Android project in the wiki.

Expression evaluation

Format specifiers can be appended to watch and repl expressions to change how the evaluated result is displayed. The specifiers work with the same syntax used in Visual Studio. See https://docs.microsoft.com/en-us/visualstudio/debugger/format-specifiers-in-cpp for examples.

You can also apply the specifiers to object and array instances to format fields and elements:

Note: Format specifiers for floating point values ( e / g ) and string encoding conversions ( s8 / su / s32 ) are not supported.

Powered by coffee

The Android Developer Extension is a completely free, fully open-source project. If you’ve found the extension useful, you can support it by buying me a coffee.

If you use ApplePay or Google Pay, you can scan the code with your phone camera:

Every coffee makes a difference, so thanks for adding your support.

Questions / Problems

If you run into any problems, tell us on GitHub or contact me on Twitter.

Источник

ppoffice / README.md

Install Termux, an Android terminal emulator that provides a Linux execution environment and various tools.

Update system packages in Termux:

Install dependencies, including python, nodejs, and yarn:

Install code-server, an adaptation of Visual Studio Code that runs as a web app using the following command. The installation may take a while:

Before starting code-server, we are going to fix an error caused by spdlog, which is a dependency of Visual Studio Code. First, change your working directory to

You will need a text editor for the next step. Here Vim is used for this task, but you are free to use whatever text editor you love:

Open binding.gyp and enter edit mode. You can do this by pressing i once you open the file using Vim:

Add «libraries»: [ «-latomic» ] below «target_name»: «spdlog», . This helps spdlog compile on Android.

Save the file and quit text editor. You can do this by pressing ESC and then wq in Vim:

Recompile spdlog using the following command:

(Optional) To see if spdlog works, run:

To fix the file search function of code-server, install ripgrep via pkg and link it to the correct place:

Finally, change the working directory back to home and start code-server with the following command:

Now, you can open your browser and visit code-server at http://localhost:8080.

(Bonus) If you wish to visit this code-server from another device in the same local network, you can expose the HTTP service to all network interfaces by starting code-server with —bind-addr :

You can find the password under

You may also need to enable HTTPS to enable clipboard and others features of Visual Studio Code in browsers. To do this, install openssl-tool and let code-server generate a certificate on startup:

You can get the public IP address of your device using the command below in Termux:

Источник

Can VS Code run on Android? [closed]

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 2 years ago .

Does anybody know about plans of MS to support running VS Code so it can run on Android OS?

6 Answers 6

Running VS Code on Android is not possible, at least until Android support is implemented in Electron. This has been rejected by the Electron team in the past, see electron#562

Visual Studio Codespaces and GitHub Codespaces an upcoming services that enables running VS Code in a browser. Since everything runs in a browser, it seems likely that mobile OS’ will be supported.

It’s also possible to run VS Code on Android by installing Linux on your Android device as described in this answer.

I don’t agree with the accepted answer that the lack of electron prevents VSC on Android.

Electron is really the desktop equivelent of projects like Apache Cordova or Adobe PhoneGap (but Electron is much less efficient and will presumably give way to solutions much closer to Cordova/PhoneGap when possible — it is already being worked on eg. here.)

API’s would need to be mapped from their electron equivelents, and many of the plug-ins will have their own issues (but Android is reasonably flexible about allowing stuff like Python compared to iOS) so it is doable.

On the other hand, the demand for an Android version of VSC probably comes from people using the new Chromebooks that support Android, and there is already a solution for ChromeOS using crouton, available here.

There is a browser-based application that allows you to develop on a browser on your Android or any other device in a VSC-like environment. Check it out here:

Edit: This is not the exact VSC implementation and it does not have all the features of VSC, such as extensions. It’s just a VSC-like environment.

Источник

Как начать разработку приложений для Android в Visual Studio 2017 —

Энтузиасты Android, особенно программисты, знают, что нет недостатка в программном обеспечении для создания приложений Android — будь то Android Studio, инструменты для создания гибридных приложений, таких как PhoneGap, или «не требующий опыта программирования» WYSIWYG-разработчики приложений, такие как Tiggzi. Поскольку Android является ОС с открытым исходным кодом, основанной на Linux, некоторые могут не осознавать, что Microsoft Visual Studio уже давно поддерживает Android-разработку, но только сейчас Microsoft начинает говорить об этом более активно.

Множество обновлений Visual Studio за последние несколько недель добавили совместимость с Linux и Mac — и Microsoft также запустила Xamarin Live, инструмент для тестирования и отладки приложений Android без эмулятора. Это может оказаться важным шагом вперед для разработчиков Android на базе Windows.

По сравнению с другими IDE (интегрированная среда разработки), Visual Studio имеет свои плюсы и минусы. Visual Studio предлагает замечательную поддержку кроссплатформенной разработки для программистов на C ++, и, будучи встроенной средой IDE для Windows, энтузиастам, не являющимся Linux, не составит труда начать работу. Недостатками могут быть чрезмерное количество GUID и более медленная отладка по сравнению с другими IDE. Но если вы заинтересованы в разработке ресурсоемких приложений на C ++, Visual Studio — это IDE, которая того стоит.

Как установить Visual Studio на Windows

Требования:

Visual Studio 2017
Xamarin Live [Необязательно]

Загрузите установочный пакет Visual Studio и при запуске его спросят, какие компоненты вы хотите установить. Для разработки под Android, посмотрите в разделе «Рабочие нагрузки» и выберите «Мобильная разработка с C ++», затем выберите «Разработка Android».

Visual Studio установит редактор Visual Studio, отладчик C ++, различные инструменты сборки Android, компиляторы и некоторые другие необходимые ресурсы. При желании вы также можете установить эмулятор Google Android из установщика Visual Studio, но Xamarin Live заслуживает внимания — это приложение, которое работает на вашем телефоне Android и может подключаться к ресурсам Visual Studio, чтобы разрешить предварительный просмотр и отладку вашего Visual. Студийные приложения прямо на вашем телефоне Android.

Разработка Android C ++ с помощью Visual Studio

Запустите редактор Visual Studio и перейдите к файл > новый > проект > Visual C ++ > Кроссплатформенный > Android. Дайте вашему приложению имя и нажмите «Хорошо».

Отсюда вы можете выбрать шаблон, с которым хотите работать — их можно выбрать из множества, но большинство графически насыщенных приложений будут идти с шаблоном Native-Activity Application (Android).

Вам будет представлено меню «Обозреватель решений» — здесь доступны два проекта:

MyAndroidApp.NativeActivity — Он содержит все ссылки и клейкий код, необходимый для запуска вашего приложения как родной деятельности Android.

MyAndroidApp.Packaging — Он содержит файлы AndroidManifest.xml и build.xml и упакует ваше приложение в файл .apk для установки на устройствах Android.

Я не буду рассказывать вам о кодировании приложения, но после создания проекта вы можете перейти к меню «Платформа решений» и выбрать архитектуру устройства, для которого вы компилируете, а затем нажать клавишу F5, чтобы запустить приложение в эмулятор, который вы подключили к Visual Studio, или отправьте его в Xamarin Live на вашем устройстве для предварительного просмотра и отладки.

Редактирование и отладка кода Java

Если вы нацелены на приложение на основе Java вместо C ++, вам понадобится языковая служба Visual Studio Java для Android — это позволит включить текстовый редактор, который раскрасит строки Java. Закончив редактирование кода Java, вы можете перейти в меню отладки Visual Studio и выбрать «Только Java”Из меню Тип отладки.

Подключение Xamarin Live к Visual Studio

Если вы предпочитаете просматривать и отлаживать приложения непосредственно на своем телефоне Android вместо эмулятора, Xamarin Live для вас.

Сначала вам нужно установить приложение Xamarin Live из Google Play на ваше устройство Android. Затем скачайте Xamarin Updater для Visual Studio 2017 и установите его на свой компьютер.

Теперь вам нужно создать приложение для Android в виде проекта Xamarin, и вам будет предложено выполнить сопряжение устройства с помощью QR-кода на вашем экране.

Если вы хотите отправить свое приложение в Xamarin Live для тестирования на своем устройстве, просто нажмите кнопку «Выполнить» в Visual Studio и выберите один из следующих параметров:

Начать без отладки: Это позволяет редактировать приложение непосредственно на вашем устройстве, и приложение будет перезапущено всякий раз, когда изменения кода будут сделаны и сохранены.

Начать отладку: Это позволяет вам проверять переменные и точки останова вашего приложения, но код нельзя редактировать.

Live Run Текущее представление: Здесь вы можете отредактировать приложение в Visual Studio и увидеть изменения приложения на экране вашего компьютера. По сути, он транслирует окно приложения Xamarin Live на ваш рабочий стол.

Вот и все для этого руководства! Если не считать, что вы держите руку и проводите кодирование приложения, добавить больше нечего. Вы можете быть заинтересованы в следующих темах Appuals:

Как создать базовое приложение для Android в Phonegap
Как создать собственное ПЗУ из проекта Android с открытым исходным кодом | Pt. 2

Источник

Оцените статью