I've got a sample project for an OEM part from a Chinese manufacturer that uses a custom android.jar with some of their proprietary classes in it. The SDK is 4.0.3 API version 15 with Windows binaries for adb, etc.. I've got the project set up in Android Studio on my Mac, the classes are detected successfully, and it seems to build fine, but then it says "Unable to locate adb within SDK." I actually tried copying the mac adb binary from the regular up-to-date SDK dir but this didn't affect anything. Any ideas? I have no idea if there's anything truly "Windows only" involved here, or how to "mix and match" the parts of the SDK to get this to work.
If I choose the Custom SDK for the Module, and a modern SDK (i.e. API 22) for the Project, I can get rid of the "Unable to locate adb" error, but then instead I get "Error:android-validator: [GemvaryPortDemo] Incompatible version 14 of Android SDK Tools package. Min version is 19. Please, update it though SDK manager" presumably because the tools in the Custom SDK directory are very old.
Turns out this is, in fact, possible. I needed to copy over tools, platform-tools and add build-tools from my regular, up-to-date, mac Android SDK. Now it builds just fine!
Related
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 get a aapt.exe exited with code 1073741819 error when I try to build a new blank android app in VS2015 Community Edition.
Also a file obj\android\bin\packaged_resources does not exist error.
I have changed nothing and this happens.
I've tried looking this up and have found about:
Changing the output verbosity to Diagnostic [Doing this has not yielded anything useful that I can understand]
Ensuring all concerned files and directories contain no spaces or any special characters/symbols.
Installing all the latest Android SDKs.
The solutions I've been able to find (which usually include checking names of files and directories along with re-installing Visual Studio all together) do not resolve the issue. I have also tried Repairing VS to no avail as well as re-running the Xamarin for VS installer which also had no effect.
I would rather leave re-installing VS entirely as a last resort since it is a large download (+20GB).
-EDIT-
Most threads I've looked up talk about resolving erroneous syntax, missing parameters, calls to variables that were not declared, incorrect id tags, spaces or dashes in filenames etc. All usually in xml or layout files.
That is not the case for me. I get these errors as soon as I create a new project. I've checked the default code and it does not seem to have any errors in and of itself.
What is also a common remedy is to set output verbosity to 'normal' or 'diagnostic'as doing that would usually point out the culprit (often a syntax error). This has not worked for me either
Also I am up-to-date with SDK packages.
Remove SDK 24 using the Android SDK Manager. Technote on this exact issue here - https://releases.xamarin.com/technical-bulletin-android-sdk-build-tools-24/ . Totally removing "24" from my machine cleared it. Just changing targets did not.
From android SDK manager just make sure that at least one Android SDK Build Tools for your used API is installed
for example for version 22.0.1 , check the below image
I know this question is ancient, but I stumbled on it earlier today with a nearly identical problem. The answers and comments got me nearly all the way to a solution, and since this never seemed to wrap up neatly I thought someone might benefit from my flailing.
I'm pretty new to Xamarin and most other things programming and this is my first Stack answer, so my apologies in advance if I'm off base or out of bounds with anything.
Since it appeared at least some of the problem is conflicting APIs, I set the properties of the application to Android 6.0 (API 23) for compiling and targeting to simplify troubleshooting. See this screencap. This eliminated one instance of code 1073741819 right off the bat.
I then deleted everything that wasn't related to API 23 or Android 6.0 via the SDK manager. Including, rookie mistake, Android SDK Tools in the tools folder. The solution compiled error free (yay!) but my Android tools were gone...something I didn't notice until I tried to get a list of packages from the SDK Manager (that was no longer functional).
I ended up downloading a new set of command line tools from Android and placing the extracted "Tools" folder back into ProgramFiles(x86)\Android\android-sdk. This fixed my mistake with SDK Tools, and added additional packages to my "API 23 only" lineup--but the solution still builds error free.
I currently have the below packages installed per the Android SDK manager and solution builds as expected, so one can use the SDK Manager to modify the packages instead of doing full removal and reinstall of the tools folder (like I bumbled into).
Tools
Android SDK Tools : Rev 25.2.3
Android SDK Build-tools : Rev
23.0.3
Android SDK Build-tools : Rev 23.0.2
Android SDK Build-tools : Rev 23.0.1
Android SDK Build-tools : Rev 22.0.1
Android SDK Build-tools : Rev 21.1.21
Android 7.1.1 (API 25)
Sources for Android SDK : API 25 Rev 1
Android 6.0 (API 23)
SDK Platform : API 23 Rev 3
Google APIs : API 23 Rev 1
Google APIs ARM EABI v7a System Image : API 23 Rev 7
Google APIs Intel x86 Atom System Image : API 23 Rev 12
Sources for Android SDK : API 23 Rev 1
tl/dr:
The wrong combo of Android APIs installed seem to break the aapt.exe process, as does targeting/compiling in a version you don't have packages for or have conflicting packages for.
Setting application properties to a single desired Android version, and
replacing the ProgramFiles(x86)\android-sdk\tools folder with the latest download of command line tools from Android allowed it to build error free.
Everytime I build I get the below error. I'm new to cordova in Visual Studio. I actually tried installing for VS2013 first. I downloaded VS 2015 RC community and I'm trying to get the project started. However I'm getting the below message.
Attempt 1: I tried going into options>VS tools for Cordova> and clearing the cache.
Attempt 2: I've verified that have the correct path to Android SDK.
Attempt 3: I've download Android Studio thinking that it make magically load secret files for Android that I don't have.
All three failed! Help!
EDIT: I downloaded the Android Stand-alone SDK Tools and payed close attention to the path they were installing in. I notice that these were installing in the AppData folder on my machine and not the C:\Program Files x86....android sdk folder. I referenced this new folder and it seems to be working.
Note that these are warnings, not specific build errors. These messages are telling you that you have not installed some specific Android SDK components (not necessarily the Android SDK manager or tools as a whole which is what the link on the Android site gives you). In particular, you need updated build tools and the Android API level 21 SDK. If you have a more recent version of the build tools you are probably fine but missing the specific Android SDK mentioned can cause builds to fail. Each version of Cordova has different SDK version requirements. (4.3.0 uses 21 while 5.0.0 uses 22.)
To install, open the Android SDK manager (which should be in your start menu if you allowed VS to install the SDK for you or see here for its location if you did not).
Then, be sure the following are then checked and click install:
First the build tools version:
Then at least the "SDK Platform" for API level 21. You can also check the entire category if you want access to emulator images. Also note that, despite the name that appears in the SDK manager, a given SDK allows you to target a wide variety of devices. The version like "5.0.1" simply tells you that the SDK enables you to optionally use APIs available up to that version of Android in your native code.
I would like to install the SDK for several android platforms on my chromebook using Ubuntu with crouton when I get it. The problem is that the chromebook I might get only has 16gb minus the OS. Installing the android SDK to eclipse also seems to install the whole emulator as well and it takes up A LOT of storage. Last time I did it I install 3 SDKs and the total space was almost 10gb.
Is there a way to install just the bare essentials for android development?
I don't want to run an emulator since I have several devices at my disposal and the chromebook won't be able to handle it anyway. Thanks! :)
Assuming you already have a JDK installed, the bare minimum you need for Android development is the standalone SDK, the platform tools, and at least one version of the Android platform. All of that takes up less than 1/2gb.
You can get the standalone SDK from here. Scroll down to the bottom and it's under Other Download Options / SDK Tools only. Once you have that downloaded and unzipped somewhere, go into the android-sdk-linux/tools directory and run the android command there. It will popup the Android SDK manager. Uncheck everything except for the following and click install:
Tools
Android SDK Platform-tools
Android SDK Build-tools
Android 5.1.1. (API 22) // or different version
SDK Platform
Google APIs
Extras
Android Support Library
other packages if your app needs them
You can find more information about how to use the standalone SDK for setting up your project and whatnot here.
hi when i try to run an android program in intellij i get the following error:
Error:android-validator: [myapp4] Incompatible version 16 of Android SDK Tools package. Min version is 19. Please, update it though SDK manager.
i dont have internet connection so i have added android SDK components manually (i have included several APIs as you can see in the following picture:
but when i created the project i didnt set any min version for intellij and when i try to run my project i use an emulator (which i defined in AVD manager).
i dont know what is the problem and by the way i can`t connect to internet so a usefull solution would not involve connection to internet.
If you look carefully, the error message is talking about Android SDK Tools, not Android SDK. You should look for it inside your Android SDK Manager. There is a component named Android SDK Tools, that is what you need. You probably want to update everything available inside the "tools" folder too.