Just compiled android 8.0 source code. I'm fairly new to AOSP.
It is quite confusing, the ./out contains a lot of files.
Currently, i couldn't create android project on Intellij yet, because i haven't specify the android SDK.
I want to add my customized ROM as android SDK to Intellij, instead of downloading SDKs.
Does anyone had similar experience loading their own ROM to android app IDE?
You just need to trigger a SDK built, e.g.
$ . build/envsetup.sh
$ lunch sdk_x86_64-eng
$ m -j sdk
Afterwards, you have your SDK at out/host/darwin-x86/sdk/sdk_x86_64. Point your Android Studio SDK location (in Project Settings) to that folder and you should be good to go. You might need to install the required build tools, but the IDE prompts for it in case.
Related
This is the webpage showing from where I downloaded the SDK:
On extracting the .zip folder, and opening the 'tools' folder, all I can see in an emulator.exe, mksdcard.exe and a host of .bat files (as shown below).
How do I proceed?
In IntelliJ IDEA 2017.1 and 2017.2 setting up Android SDK from scratch is complicated. I would recommended to install Android Studio and manage SDK platform there. This problem will be addressed in one of the nearest updates.
If you are brave enough, it's still possible to set it up without Android Studio using the tools\bin\sdkmanager.bat command line tool. GUI version of the SDK Manager is deprecated (no longer available in the SDK download). Standalone SDK can be downloaded here. Look below the Get just the command line tools section.
So, you will need to install at least one platform version.
First run the update to ensure you have the latest tools:
sdkmanager --update
Now you can list the packages available for installation:
sdkmanager --list
To install Android Platform: (Edit April 2022: need quotes now)
sdkmanager "platforms;android-26"
To install the current build tools version (optional):
sdkmanager "build-tools;26.0.0"
At this point you should be able to add Android SDK configuration for the installed platform version in IntelliJ IDEA like this:
You will also have access to Android SDK configuration UI where you download additional components and perform updates (just like in Android Studio):
As Karan Sharma mentioned in this post.
To add an existing SDK, you should close your project if you have any open one.
Then from the Welcome page select Configure -> Project Defaults -> Project Structure
And then from the Default Project Structure window and from the left side, select SDKs and then the plus button from the toolbar, and from the menu select Android SDK
And then give the address to the location where your Android SDK files are in, and hit OK.
Thats it!
Now it should be working for you!
You can also install the SDK in the IDEA GUI. It says in the tutorial,
If you don't have the Android SDK configured, IntelliJ IDEA will
detect this and prompt you to download it:
launch android executable and install the platforms and build-tools.
I know that this is a pretty basic question. But I am new to native android development and I am having trouble wrapping my head around what is what.
I am using the Android Standalone SDK and not using Android Studio so please guide be accordingly.
Let's say that I want to build my app for API level 19. what level of platform tools and build tools do I need to install.
This is what I have currently
As I want to build for API 19, which I have installed. Do I need to have version 19 of Android SDK build tools or they can be higher?
Kindly please explain to me what each term means as well in laymen's terms.
-Thanks
Build-Tools is a component
of the Android SDK required for building Android apps. It's installed
in the /build-tools/ directory
So, build tool is to build your android app. That is like the makefile for C projects. Output is an APK file.
Android SDK Tools is a component for the Android SDK. It includes the
complete set of development and debugging tools for Android. It is
included with Android Studio.
So, Platform tool is where all the tool to interact with the android device you have, such as fastboot and adb. For example, to install your apk into the devices, run it, debug it, and grep some file from it, you need to first connect your device to adb bridge and run all those command on it.
Let's say that I want to build my app for API level 19. what level of
platform tools and build tools do I need to install.
Basically, you should have all the latest thing here. If you are deploying for a API 19 device, you should also have the Android SDK platform 19.
I haven't touch those things in a while, because I install all those things anyway, so I'd appreciate correction.
Android SDK Build-Tools is a component of the Android SDK required for building Android apps. It's installed in the /build-tools/ directory. It includes the complete set of development and debugging tools for the Android SDK like emulator, sdcard, sqlite and apk builder etc.
For more details check Android SDK Build-Tools
Platform-tools are used to support the features for the current android platform including adb which is acting like a bridge to communicate with emulator or device.
You can also know more about this topic by clicking here
This may be old but i appreciate it. I build apk via the command line so I was thinking with this answer, I may not need the Platform-Tools.
By the way, we are on Android 12 already - API Level 32 :)
I am working on a school project which needs to customize AOSP. I have built an new API, also I have written apps that used these new API and they were compiled in my AOSP, they work just fine.
Now I have also compiled a SDK in my AOSP. I followed the instructions on this link to change the SDK path in android studio:
Android Studio - How to Change Android SDK Path
However, android studio still cannot resolve my new API. Does anyone have any idea on What I have done wrong? Or do I have some missing SDK tools that I need to install?
AOSP: android-5.0.2_r1
OS: Ubuntu 12.04
You will need to build the SDK from your custom version of AOSP. To do this you will need to build the 'sdk-eng' version using lunch and use the 'make sdk' build command. You can find detailed instructions inside the source code of AOSP. Here is a link specifically for the branch of AOSP you are building.
This will produce a custom framework.jar file which contains the Android API for your custom version. These files will just be stubs that do not contain actual code but do provide the API for developers to use. When building your application you will need to reference this framework.jar as your project SDK instead of one of the standard Google provided jars. This SDK jar should not be a compiled dependency as if will be provided by the custom version of Android you are running the application on.
Go to the folder in:
Android/Sdk/platforms/android-21/
Replace the android.jar with your custom made android.jar SDK and then inside Android Studio go to:
File --> Invalidate Cache & Restart
I used to download the Android NDK as new version were pubished to the devloper website.
It appears Google has recently updated the developer website and removed direct NDK download links, and replaced them with a a bunch of circular references that eventually lead to the SDK download. The SDK download page does not include the NDK. The closest I have found to a download and NDK is Download Android Studio and SDK Tools.
Running $ sudo /opt/android-sdk-macosx/tools/android does not offer a way to update the NDK.
How do I update the NDK in place using the existing NDK or one of the SDK tools?
Or where is the download of the actual NDK located?
To be clear, I use ant and ndk-build from the command line. I don't use Eclipse or Android Studio. Eclipse and the Android plugin is broken; and Android Studio does not really support NDK and JNI.
Plus, I don't really want to learn another editor since I kind of know Eclipse, and I know already how to do it from the command line (so there's no need for an editor).
In Android Studio, go to Tools (top-menu item) > Android > SDK Manager
Click SDK Tools tab
Scroll down and you will see NDK as an option, with detail if an update is available
I have Win7-64 laptop, installed JDK, Eclise is working. I am failing to install the Android SDK. I downloaded 'adt-bundle-windows-x86_64-20131030' from developer.android. When I used SDK Manager, i could select required installation components and it shows as complete. However, I dont see anything in the 'All Programs'. I also dont see any plugin (that I was supposed to see) in the Eclipse as well. So I gather I am missing some step. Can anyone help. Pl see![][1]
Your downloaded sdk files may not shown in All Programs as they are not executable nor meaningless to be clickable.
Sometimes many folks got a problem to point out exact SDK path, so more than one SDK binaries are downloaded. I think your eclipse cannot find sdk path properly.
To find out where the SDK path is, it displays in SDK Manager.
Then, you can set the path in Eclipse Eclipse->Window->Preferences-> select Android from left hand menu. Check SDK Location has same path; see screenshot.
FYI, as downloaded files are just a bunch of binaries used only for Android development, you can copy the whole android-sdk folder to other place.
I personally recommend to change the directory to C:\Android or C:\User\<me>\Documents\Android-sdk as default directory is in C:\Users\<me>\AppData\Local hidden folder.
The ADT bundle includes an Eclipse executable fully configured with the Android SDK tools. It does not add a plugin to an existing Eclipse install. To launch ADT/Eclipse goto . Search for eclipse.exe within that directory. This is the executable you need to launch.
On my Mac, the Eclipse executable is in /Applications/adt-bundle-mac-x86_64/eclipse/Eclipse.app/Contents/MacOS/eclipse. Just a guess, but on Windows, the path will probably look something like adt-bundle-windows-x86/eclipse/Eclipse.app/Contents/windows/eclipse.exe
I would personally suggest to use Android Studio 2.1 for easy install of plugins as whenever there is an update to any platform tools or build tools they are readily available and the dependency injection is far better with the build tools such as Gradle which are bundled with the Android Studio .
Android Studio
Android adt is plugin to use Android SDK in Eclipse IDE. You have SDK you have Eclipse now you need to install adt plugin in eclipse to use your SDK.
You can refer Android developers for plugin installation
https://stuff.mit.edu/afs/sipb/project/android/docs/sdk/installing/installing-adt.html#Download
For "I dont see anything in the 'All Programs' I also dont see any plugin" part you will not see any extra program installed in your system as adt is extension of eclipse. When you will have adt in place you should be able to see Android option in eclipse preferences. You should also be see Android APplication option while creating new project.