How can the revision of an android.jar file be determined.
E.g., given android-sdk/platforms/android-8/android.jar,I would like to retrieve the source code for its contents by deriving its revision and provide it as -b option argument to the repo init command (acc. to http://source.android.com/source/downloading.html)
Actually, this question could be rephrased:
"How can I retrieve the source code for a specific android.jar?"
Is there any alternative to using repo? I'm only interested in the the Java source-files.
There is no need for you to use repo and gather sources of android.jar, since someone else already did it. There are plenty of sites on the web with packaged source for android.jar files. Personally I prefer source packages from adt-addons project:
Android Sources
This plugin helps you to add source to android libraries in Eclipse.
In ADT >=8.0.0 you can add Android sources to Android container for
all your project with installing the Android source feature using
http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update/
update site After installing the Android source feature all your
existing projects as well as new created projects which is targeted
for Android 2.3.4, 2.3, 2.2, 2.1, 2.0.1, 1.6 and 1.5 will have
attached the source jar.
The plugin includes sources for the following API levels:
10 - Android 2.3.4
9 - Android 2.3
8 - Android 2.2
7 - Android 2.1
6 - Android 2.0.1
4 - Android 1.6
3 - Android 1.5
The plugin is about 170 MB size.
Related
Delphi comes with pre-installated Android SDKs that are installed during the installation time of the Delphi Development Studio. E.g. Delphi 10.2 (AKA 19.0) comes with Android SDK 24.3.3 with paths (Tools - Options - Environment Options - SDK Manager):
SDK base path:
C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidSDK-2433_19.0.29039.2004
NDK base path:
C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidNDK-9c_19.0.29039.2004
And Delphi 10.4 (AKA 21.0) comes with Android SDK 25.2.5 with paths:
SDK base path:
C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidSDK-2525-21.0.38860.1461
NDK base path:
C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidNDK-21-21.0.38860.1461\android-ndk-r21
My question is - what should I do to install Android SDK 24.3.3. in Delphi 10.4. This may be no the best thing to do, this may be even the incompatible thing to do, but, however, this is very good example of the situation when one SDK is shared by several Delphi versions.
https://www.embarcadero.com/starthere/xe5/mobdevsetup/android/en/adding_an_android_sdk.html (and partially https://www.embarcadero.com/starthere/seattle/mobdevsetup/android/en/adding_an_android_sdk.html) suggests that I can download the Android-provided SDK, unzip it in some custom directory and simply add those paths in the new-SDK fields for the paths.
But I am confused - where to get e.g. Android SDK 24.3.3? There are many 3rd party sites which may be unreliable. And will such simple installation work? E.g. I provided the examples of installation-time-installed SDKs and all of the contains the additional directories that depend on the verions of the Delphi - e.g. Android SDK 24.3.3 for Delphi 10.2 (19.0) has directories with the number 19 and Android SDK 25.2.5 for Delphi 10.3 (21.0) has directories with the number 21. So - Delphi may take some additional steps during installation and create those directories?
Or maybe Delphi is very conservative regarding the SDKs that can be used for the particular version of Delphi? It may be so, but it overexcessively limits the versions of devices that can be supported by the apps developer with particular version of Delphi. This paragraph (note) is not the additional question, it just makes suggestion that my main question can be irrelevant wrt how Delphi versining has been inteded?
You can install additional SDK's using SDK Manager tool of Android Studio. SDK Manager install Android SDK's by default to C:\Users<WindowsUser>\AppData\Local\Android\Sdk.
After installing Android SDK, should define it to Delphi IDE by using Tools -> Options form.
In Options form under Deployment - SDK Manager section, you can add new SDK for Android 64 or Android 32 platforms. During addition of new SDK, you should enter Android SDK install location of Adroid Studio for Android SDK base path. Again it is by default, C:\Users<WindowsUser>\AppData\Local\Android\Sdk.
For Android NDK base path, you have two options.
Option 1 is to use the NDK folder path of Delphi NDK installation.
For Delphi 11.2, it is C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.46141.0937\android-ndk-r21.
Option 2 is to download another NDK from https://developer.android.com/ndk/downloads, extract the NDK to a folder and use this folder as NDK base path. You should be careful, since not all new versions of NDKs are supported by Delphi.
After adding new SDK to Delphi IDE, It is listed in SDK Versions list as "Android 32-bit" or "Android 64-bit". For example, it is listed as Android 33.0.3 64-bit.
In addition, you can upgrade Android SDK which Delphi installed. To upgrade your installation, the procedure given in the following link must be applied.
https://blogs.embarcadero.com/developing-for-android-11-12-with-delphi-11-alexandria/#updating-your-android-tools
as far as I know, you need to download new SDKs with SDK manager. Search for it.
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'm importing this project from Github into Android Studio 2.1.2. I'm at a point where it's asking me "Please select project SDK. This SDK will be used by default by all project modules." There are 2 options - "1.7" or "Android API 23 Platform". How do I know which one to pick? The "1.7" option has a ton of files while the other has only 2 files.
My overall goal is to just open this project and learn from it. I wanted to look at the source code for a functioning project that is not as simple as the tutorials given for Android Studio. I wanted a bit more complexity.
That means you probably haven't configured Android Studio. YOu have to install Android SDK in order for everything to work.
I cannot find the raw SDK download link, so you probably have to use Android Studio to download it.
Also, you should download Java 8 to get all functionality of Android Studio 2.1.2(Android Studio 2.x requires java 8(or higher)) so selecting 1.7 is probably for compatability mode
My recent Android Studio 2.2 preview 3 installation can't seem to find CMake.
I tried installing it from the SDK Tools but there's no such package...
We won't be able to support CMake (or ndk-build) on 32 bit OS because it is not supported in CLion which is the tech we use for the C++ editor. The root cause is memory\address-space limits.
Here's a helper page where I describe Android Studio C++ support including the 64 bit requirement: https://sites.google.com/a/android.com/tools/tech-docs/external-c-builds
I hope this helps!
- Jomo
I'm trying to build a project in Android 1.5 that references another Android (library) project compiled against Android 1.5 and I keep seeing this error in the Console in Eclipse:
Target 'Android 1.5' does not support building project with libraries.
I'm running Eclipse 3.5, and version 0.9.7 of the ADT.
I followed the instructions here:
http://developer.android.com/guide/developing/eclipse-adt.html
What gives?
The problem was that I was using the wrong revision of Android 1.5. Table 1 on this page:
http://developer.android.com/guide/developing/eclipse-adt.html
states that you must be using revision 4 or later of Android 1.5 to use Library projects.