Following the steps here to start developing android accessories with ADK 2012, there is this step:
Copy the < adk-source-download >/adk2012/board/library/ADK2 directory
and its contents into your sketchbook/libraries/ directory, so that
you create a sketchbook/libraries/ADK2 directory.
This is my very first time working with ADK 2012 so I'm not quiet sure what I'm supposed to do in this step, so maybe if someone could clarify it more for me?
Thank you.
The ADK2012 source must be downloaded and compiled using Git. This separate from the zip files you also download from the Google page. The zip file contains the Arudio IDE only.. If using windows you will need to pay special attention to the "note:"
From<Downloading the ADK Source>:
Download and install Git for your development system.
Download and setup the repo tool, as described on the Android open source project site.
Note: Developers using Windows must use a Linux compatibility package, such as cygwin, to install and run repo. Within your compatibility environment, you must install curl, git and python to be able to download and use the repo tool.
In a terminal window, create a new directory for the downloaded source files, initialize and synchronize a local repository:
$> mkdir android-accessories
$> cd android-accessories
$> repo init -u https://android.googlesource.com/accessories/manifest
$> repo sync
This is the hardest part.... If you make this this far you are on the path for success!
You should now have a folder called android-accessories with sub-folders /adk2012/board/library/ADK
Now you need to copy the ADK folder to your Arduio libraries folder
You need to find the location of your "sketchbook/libraries" folder. This folder was created when you installed the Arduino software. In Arduino click --> File --> Preferences. The first item should be "Sketchbook location". This folder will have sub-folder called "libraries.
Once you copy the ADK folder to library you can move to set 4 (restart Arduio) on the google help page
Related
in the past, I did not download the telegram source with the git but now i need update my source and I need connect myProject (my Unofficial Telegram), to mainProject (Telegram) on github. my IDE is Android Studio. git in Android Studio is in VCS menu. but I do not know what to do, for conect my project to github project.
Make sure you have git installed on your system. If not, go to this link and download it
https://git-scm.com/download/win
Right click inside your local project folder and select 'Git Bash Here'
(If you want to clone your entire GitHub project into your local project, do it by typing:
git clone https://github.com/DrKLO/Telegram.git
If you already have the files and you just want to update it, skip this cloning step)
Check if your project folder has .git folder in it. (Check the hidden folders too) If there isn't one, type the following in your GitBash window
git init
Add the link to your GitHub (remote origin) by typing
git remote add origin https://github.com/DrKLO/Telegram.git
Update your files with the GitHub source by typing
git pull origin master
If you just want to know how to connect your project in Android Studio to GitHub, here's a simple tutorial:
https://www.londonappdeveloper.com/how-to-use-git-hub-with-android-studio/
(Skip the steps where he creates a new GitHub repository and an Android Studio project, since you already have both)
For detailed understanding on using git and github, i suggest you take this course:
https://in.udacity.com/course/how-to-use-git-and-github--ud775
My android studio said it wanted to update. But when I did I tried to update it but it wouldn't work so I had to launch:
C:\Users\username\AppData\Local\Android\sdk\tools\android.bat to install other packages. But the NDK file wouldn't update, so I manually downloaded it from:
https://developer.android.com/ndk/downloads/index.html#download
Now I have this zip file and where should I extract the folder? Grateful for any help!!
The folder name is android-ndk-r13b.
Yes, rename the extracted folder android-ndk-r13b(probably the exact name will be outdated someday soon) to ndk-bundle (you can put the NDK [and SDK for that matter] anywhere, and leave the name alone if you want {do not do this, I'm sure seen one case of hard-coded sub-path}), then, make the settings point to the location where you put it.
Android Studio, File menu | Project Structure Ctrl+Alt+Shift+s(short-cut: ctrl+Alt+Shift+s):
It might also be helpful to you to set/check the following environmental variables:
NDK_HOME=C:\Android\sdk\ndk-bundle
NDK_MODULE_PATH=C:\Android\sdk\ndk-bundle
EXTRA stuff:
While were doing environmental variables (belt-and-braces for SDK):
ANDROID_HOME=C:\Android\sdk
For JDK:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_112
JAVA_PATH=C:\Program Files\Java\jre1.8.0_112\bin
JDK is the Java Development Kit.
JRE is the Java Run-time Environment.
If your tight on memory (RAM) for Gradle (700 Megabytes is about as low as you can go, other tools like monitor.bat use this variable too, it's ubiquitous) (clearly you want to make it as big a possible, without swapping making it extremely slow to build {note the underscore VERY important ! [it's a reserved name space conflict operator, don't ask me to explain it's VERY complicated !]}):
_JAVA_OPTIONS=-Xmx700m
Some Links
Setting up for Android NDK development
Add C and C++ Code to Your Project
Getting Started with the NDK
Using C and C++ Code in an Android App with the NDK
Download the .zip file. Start the installation through SDK manager. Go to %userprofile%\AppData\Local\Android\sdk\ndk-bundle and copy .installer folder to desktop and cancel the downloading in SDK manager. Open .installer folder and open .installationdata file and check the folder in which the file is being downloaded like: %userprofile%\AppData\Local\Temp\PackageOperation01. Copy downloaded .zip file to the folder PackageOperation01 or whatever listed in .installationdata file. Now copy the .installer folder from desktop to %userprofile%\AppData\Local\Android\sdk\ndk-bundle and start the SDK manager and start the installation again for NDK. The SDK manager will start the installation skipping the download process.
In order to help those who are using MAC OSx, The process on MAC is as follows:
download ndk-bundle in zip format
run terminal
use below command to find your temp directory in mac (e.g. /var/folders/sp/31g4p3kd5l10c68qdy475krr0000gn/T/)
echo $TMPDIR
change directory to PackageOperation01
cd PackageOperation01
copy ndk-bundle.zip into the directory
cp /path/to/ndk-bundle.zip /$TMPDIR/PackageOperation01/
start Android Studio and in SDK-Manager try to install ndk-bundle again.
In Mac, With Android studio 3.3.2, SDK Manager keeps choosing new temporary folder to download the ndk-bundle. The following steps helped to install the downloaded ndk zip file.
Go to SDK manager, start downloading NDK.
Go to ~/Library/Android/sdk/ndk-bundle/.installer
cat .installData
path=/var/folders/vr/mz4hsqqs0wlgj9sfcpn3wfn5g2lwk3/T/PackageOperation07
PackageOperation0X is the temp folder chosen to download the zip file
Copy downloaded android-ndk-r21d-darwin-x86_64.zip to this temp folder (PackageOperation0X)
Copy ~/Library/Android/sdk/ndk-bundle folder to some other location
Cancel the NDK download in SDK Manager
cd ~/Library/Android/sdk/
You may find ndk-bundle folder missing as download has been cancelled in the SDK Manager.
Move the previously copied ndk-bundle to ~/Library/Android/sdk/
Go to SDK manager, start downloading NDK again. Existing file will be scanned and installation will be started skipping the download step.
I'm downloading Android source code using the following command.
repo init -u https://android.googlesource.com/platform/manifest -b Android-4.1.2_r1
repo sync
I've almost downloaded about 1.4 GB of files, but there is no source code in working directory. Working Directory has only one folder ".repo" (Which is about 1.4 GB and does not seem to include source code).
Is this correct way to download android source code? If not, where am I going wrong?
Finally Got answer.This is working as it should!
First it fills up .repo folder, which can be huge(10 GB). Only after that repo script downloads android source code.
References:
1. After Repo sync, there are no files in the directory
2. What are the purpose of the bare git repositories in .repo/projects/ created by the Android repo script?
If you want to work with android you will want to install the Android SDK. This page explains how:
http://developer.android.com/sdk/installing/index.html
From the SDK Manager, found in the tools directory, you can download any version of Androids source code you would like.
The Android source code actually has an empty master branch.
Unless you specify a particular branch to repo, it will always pull the master branch.
The reason that Android has an empty master branch for many of its repositories is because, the user is expected to use a particular version of the Android source rather than the latest.
(The latest is also typically a branch..but not master)
try something like this
repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
You should see files other than just the .repo folder
I am learning to develop for Android devices.
However, when I download the example from:
http://developer.android.com/training/multiscreen/screensizes.html
There is no bin folder. I am developing from the command line (as opposed to through Eclipse), and
ant debug install
requires a bin folder.
What step am I missing to generate the bin?
I try to search for it but I just cant. I am running Windows 7 on Lenovo G460 laptop. I tried to install Ubuntu on it but I cannot use Wireless to connect to the internet for some reason.
Is there anyway for me to get a look at Android source code or at least just the Calendar part of it?
You can browse the android source code using their repository browser. If you want to check out a specific project (i.e. download the source), you will need to get the version control system Git. When you have Git running, you can either clone a complete repository using git clone https://android.googlesource.com/projectname.git or just get the HEAD (the most current version of all files, useful if you only want to browse through the source) by doing git clone --depth 1 https://android.googlesource.com/projectname.git.
The project name is the top folder you select on the repository browser, for example platform/packages/apps/Calendar for the Calendar app. Then the full command is git clone https://android.googlesource.com/platform/packages/apps/Calendar.
The GitWeb and Google Code Search repositories for Android have been retired since this question was originally answered. Fortunately, the SDK Manager finally allows you to download the source code for Android 4.0 and later along with all of the APIs and tools.
If you need access to pre-Ice Cream Sandwich (4.0) Android source code and don't want to use Google's non-Windows download instructions, you can search GrepCode for what you need online. (Look for "android" and the name of the class or method you want, and then pick the version of the code you want.)
GrepCode works, but I have seen it crash IE a bunch of times. An alternative would be to download the Android Sources plugin for Eclipse, which gives you all of the source code for versions of Android up to 4.0.1.
Once you have the source code, you can attach the source directory you are using to your .jar in Eclipse, as follows:
Right-click the project > Properties > Java Build Path > Libraries tab > select the + beside the .jar you want to attach source code to > click on Source Attachment to edit the path to where the source files reside.
Thanks a lot, a quick guide on helping the download in windows, check this
http://honey200.wordpress.com/2011/11/17/download-android-source-code-in-windows/
Steps:
Download Cygwin from http://cygwin.com/install.html.
Install cygwin with almost all defaults. During cygwin setup, select modules curl and python (search for them) and mark them to be installed.
Start cygwin.exe and go to your preferred directory (mine is D:/Android/sources/4.0/try2). Example: $: cd /cygdrive/d/Android/sources/4.0/try2
Run the below instructions one by one:
i) mkdir bin
ii) PATH=/cygdrive/d/Android/sources/4.0/try2/bin:$PATH
iii) curl https://storage.googleapis.com/git-repo-downloads/repo > /cygdrive/d/Android/sources/4.0/try2/bin/repo
iv) mkdir source
v) cd source
vi)
Master branch:
repo init -u https://android.googlesource.com/platform/manifest
4.0.1 branch for example:
repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
vii) Give credentials if needed
viii) repo sync
Source: click here
1) Install Git: http://git-scm.com/
2) Open Git Bash from Start Menu > Git > Git Bash
3) In Git Bash window, change current directory to your favorite directory (For example D:\android_src) by following command: cd /d/androidsrc/
4) In Windows Explorer, create an empty file D:\android_src\download.sh and open it by notepad
5) Open the following link and copy the code & paste it into D:\android_src\download.sh, then save and close the notepad:
http://pastebin.com/DfqBFKnK
6) Execute download shell script in Git Bash window by following command: ./download.sh
See also: https://android.googlesource.com/
Install cygwin, and install the cygwin verion of git, then follow the normal instructions for installing repo.
You'll want to have git around anyway - it's become the standard vcsfor modern dev work. Some stuff is in svn still, but that's dying out.
For me the easiest way is to browse it on GrepCode.