Want to set up a linux server only to build and test, and I found Android does not offer sdk only package anymore.
Previous sdk download page was redirect to studio download page.
I need android sdk package. but now Android only supply the sdk-tool, in my mind sdk-tool/ is under sdk/, like path-to-sdk/tools. When android project builds, I need to set env $ANDROID_HOME, and $ANDROID_HOME is the directory of the sdk/ not the sdk/tool/
I try the android-studio-linux, but the pack I unzipped can not found android sdk, it seems android download sdk on first run.
I try the to find the android-sdk, but only get the older releas.
Please give me some suggestion, how to build android apk in non-gui linux server, the server is Ubuntu 64bit.
Well they still offer, they just have moved it to bottom to promote Android Studio more over other other IDEs.
Check the bottom of the page or just use this link to download it for linux. You can very well use gradle to build and package your app so if there is actually no compulsion of using Android Studio.
Update Also this document explains how to develop Android apps/libs from commandline.
Related
I was just wondering if I can use flutter without downloading Android studio because Android Studio is very heavy
You can do so, by following the below steps.
Note: The sum of all the downloaded files is about 1.5GB including VS Code.
Download and install VS Code 88MB.
Install the Flutter extension, which automatically installs the Dart extension.
Download the Flutter SDK 818MB. Extract to C:\Flutter.
Download the Android Command Line Tools 115MB. Extract to C:\Android\cmdline-tools.
Download the Android Platform Tools 5MB. Extract to C:\Android\platform-tools.
Download the Java SDK (version 17 or lower) 171MB. Extract to C:\Java.
In Environment Variables edit the Path system variable and add the following:
%SYSTEMDRIVE%\Android\platform-tools +
%SYSTEMDRIVE%\Android\cmdline-tools\bin +
%SYSTEMDRIVE%\Flutter\bin +
%SYSTEMDRIVE%\Java\bin.
In Environment Variables add the following new system variables.
Name: JAVA_HOME. Value: C:\Java.
Name: ANDROID_HOME. Value: C:\Android\cmdline-tools.
Name: ANDROID_SDK_ROOT. Value: C:\Android\cmdline-tools.
Run the following command as administrator: sdkmanager --licenses, and accept all the licenses.
In phone's settings, enable Developer options and USB debugging, also enable the Developer mode on your PC.
Connect your phone and make sure that all drivers are installed.
Create a new flutter project and run it using the command flutter run. This will download the needed files (automatically) to run the app on your phone and create an APK file. Download size is about 300MB.
You can use Visual Studio Code or Emacs Link
You can still code, but it won't compile, since Flutter SDK needs the Gradle and other tools(that comes with android studio) to be compiled and run in Android, and the flutter doctor in the command line will complain too and won't let you do much.
Yes you can, you want to download VSCode and get the dart & flutter extensions in it, but you need AVD which is provided with Android Studio to run your applications or you can use any other emulator.
Needless to say you also need the Flutter SDK.
You could try https://dartpad.dev/flutter if you're not planning anything big. It's a flutter version of the dart playground and it lets you test some flutter features, but (as far as I know) it's limited to one file only. And you won't be able to use 3rd party libraries too.
I have tried to use ionic lab. I tried to build a simple blank app using the lab but when I go to build my android app it says I need to have android sdk. I have android sdk and the platform tools already. I even added to my path in case you were wondering. I was graciously sent here to ask for help after trying to research my issue by looking at "ionic android build error - failed to find android_home".(which was when i checked my environment path). I took a screen shot of both(environment and error from ionic lab console). error and
environment
For windows:--
set ANDROID_HOME=C:\<installation location>\android-sdk-windows
set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
The Android SDK download does not include specific Android platforms. To run the code in this guide, you need to download and install the latest SDK platform. You do this by using the Android SDK and AVD Manager that you installed in the previous section.
Open the Android SDK Manager window:
android
Note: If this command does not open the Android SDK Manager, then your path is not configured correctly.
Select the Tools checkbox.
Select the checkbox for the latest Android SDK.
From the Extras folder, select the checkbox for the Android Support Library.
Click the Install packages... button to complete the download and installation.
Note: You may want to install all the available updates, but be aware it will take longer, as each API level is a large download.
Could you please do following stuff in terminal. It might be helpful for you.
Step:--1
export ANDROID_HOME=~/android-sdk-macosx
PATH=$PATH:$ANDROID_HOME/tools
PATH=$PATH:$ANDROID_HOME/platform-tools
Step:--2
Update SDK and go to directiory and set your SDK path properly.
I'm trying to build(not develop) an android application on server. I've the whole native android code on the server, which I need to build according to some modification done on the server.
I've been looking all over the internet but couldn't find any detailed solution. All I got to know was I might need Jenkins or some CI tool (which I think is time consuming as I'll need to get them installed on server and then all the android dependencies).
Initial idea was to build the .apk file via some python script which contains all the gradle commands in it.
How can i do this?
Android apps can be built easily on a system that doesn't have any Android tools installed by applying the Android SDK Manager plugin for Gradle to your project.
When running ./gradlew assembleDebug (or whatever task), then Gradle will be installed and then all Android dependencies, including the SDK tools, build tools, platform versions and other dependencies will be installed automatically.
You can run this simply on the command line yourself, or automate to run after every commits to source control easily with Jenkins (it's easy to install on a wide range of operating systems).
You need to install Stand-alone SDK tools and suitable SDK packages to your server to build Android software.
When you have all installed and good, you can build APK with gradle , e.g.
(Linux and Mac)
./gradlew assemble
Helo,
I am currently trying to build the base phonegapp android app that's automatically created, so I navigated to the directory... but when I use the command
phonegap build android
I just get this random error, as shown in the attatched picture.
Extra info
I am currently on Windows 8, and am completely new to making apps, and am new to the command line as well. Not very familiar with this stuff...
What I'm trying to do would be called 'compiling', right?
Yeah, I had the same problem yesterday - but with a little help of a colleague I got it!
Step by step tutorial (for Windows)
Install node js
Install phonegap using command line: npm install -g phonegap
Install Android SDK
Launch Android SDK Manager and install Android 4.4.2 (API19)
Because latest phonegap/cordova version requires this
Documentation for Android SDK and SDK Platform should be enough
Also update already existing packages
Create an environment variable called ANDROID_HOME which points to destination of Android SDK. e.g. C:\Users\You\AppData\Local\Android\android-sdk
Download Apache Ant and extract the archive somewhere
Create an environment variable called ANT_HOME which points to destination where you have extracted Ant
Install JDK (Java Development Kit) for your System. Before you are able to download, you have to accept the licence
Create an environment variable called JAVA_HOME which points to destination of JDK
If you want to add plugins via phonegap automatically you should also install GIT.
Last but not least you need to add the following directories to PATH environment variable:
%ANT_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;%JAVA_HOME%\bin
Each folder is separated by a semicolon
Setting environment variables will take effect just for new command line windows. So you should reopen it, after the whole process.
Easy, isn't it? ;-)
Now you can use phonegap build android after you've created a new phonegap project. If you have your smartphone plugged via USB and installed the USB drivers, and activated the USB Debugging on smartphone, you may use
phonegap run android
And the ready build APK will be transfered and executed on your smartphone. Perfect for testing.
If you want to create a final release APK, go to
YOURPROJECT\platforms\android\ant-build
and enter ant release.
You'll find the final APKs in YOURPROJECT\platforms\android\bin.
They are unsigned, here is a Noob guide to signing an APK.
I have tested a Barcode Scanner example, and it works seamlessly.
Have fun!
also check android in cmd, if it says: 'xcopy' was not recognized.
then add to your path:
%SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem;
Armin's guide is perfect. But if you still fail you can do this.
Phonegap platform files stay in C:\Users[username].cordova\lib folder. Go there and remove android/ios/bb... driectory.
For best result run this command:
npm cache clear
After that try again, clean platfrom files will be download and build your project.
I followed a tutorial to install Eclipse and the Android development files onto an Ubuntu (Lucid) installation and Iv a feeling things are not quite right.
The tutorial can be found here.
The problem seems to be that because everything was installed into the /opt folder I am unable to load any of the sample files because of course they are read only, and I'm unsure about how safe it would be to run Eclipse as root.
My thoughts were to remove all of the Android files and start again and set the location in my /home folder somewhere, but I am unable to find any information on actually removing it (Or if this is in fact the best thing to do).
Here's what you need to do:
Install the latest java JDK.
Within eclipse, install the android ADT plugin http://developer.android.com/sdk/eclipse-adt.html
Download and install the android sdk http://developer.android.com/sdk/index.html
Run the AVD manager (in the android sdk) to install the platform components. (this can be ran from within eclipse)
In eclipse, go to preferences/android and set the SDK path.
Create an android application!
Good luck!