Is 'transition' an invalid resource directory name on Android? - android

I make the ApiDemos project from Android Sample Project. Unfortunately, the project complains invalid resource directory name transition /ApiDemos/res line 1 Android AAPT Problem.
My Eclipse is Version: Juno Service Release 2 and JDK 7. The ADT plugin is V22.6.0. What's wrong with it?

Yes, transition resources are valid as of API 19.
To get rid of the error, make your build SDK API level 19 or higher.
To do that, in Eclipse/ADT, either
open Project Properties, go to Android and select Project Build Target as API 19, or
edit project.properties at project root and edit target to e.g. android-19
Of course, you will have to have SDK 19 installed with SDK Manager and have up-to-date build tools installed.

In case another bonehead like me comes here: I didn't have version 19 of the API installed :P
Open up your SDK manager and download any necessary version. I just had the latest version installed (22?).
Also, this was for Xamarin for me. But it could be the case for others, too.

Related

Could not find android.jar for API Level 26 in Visual Studio 2017

Could not find android.jar for API Level 26. This means the Android
SDK platform for API Level 26 is not installed. Either install it in
the Android SDK Manager (Tools > Open Android SDK Manager...), or
change your Xamarin.Android project to target an API version that is
installed. (C:\Program Files
(x86)\Android\android-sdk\platforms\android-O\android.jar missing.)
As you can see from below that I have the correct api sdk platforms installed but as you will notice on the error message, it is searching for an android-O directory.
Here is my directory which you will notice has everything in it but doesn't contain android-O
I looked in my visual studio project settings and here is what it shows for target framework
Does this mean that Visual Studio 2017 doesn't support Android SDK 26+?
I discovered that you can fix this issue with 2 steps:
Download and install Visual Studio 2017 Preview by going to https://www.visualstudio.com/vs/preview/
Download and install the Xamarin update extension on both versions of Visual Studio 2017 installed by going to https://developer.xamarin.com/recipes/cross-platform/ide/change_updates_channel/extension-gallery/ and follow the steps
If you're building for a Xamarin project, you may need to rename the folder in the SDK folder from "android-{alphabetOSVersion}" to "android-{numericOSVersion}" (IE change the folder "android-o" to "android-27").
This should be done in the C:\Program Files (x86)\Android\android-sdk\platforms folder.
I was getting a similar issue.
Severity Code Description Project File Line Suppression State
Error Could not find android.jar for API level 29. This means the
Android SDK platform for API level 29 is not installed. Either install
it in the Android SDK Manager (Tools > Android > Android SDK
Manager...), or change the Xamarin.Android project to target an API
version that is installed. (C:\Program Files
(x86)\Android\android-sdk\platforms\android-29\android.jar missing.)
The easy fix was to follow the steps mentioned in the error itself from your Visual Studio (I was using Visual Studio 2019).
Click on the Apply Changes button and then reload the project.
MVS 2017 does support Android SDK 26+,
Im using it with v15.3.3.
If you have MVS 2017 installed on your machine,make sure it's up to date
then download and install the Xamarin update extension.
Check out this guide
https://developer.xamarin.com/recipes/cross-platform/ide/change_updates_channel/extension-gallery/
And as a rule of thumb,whenever you get the error "Resolve the “Could not find android.jar for API Level XX” in Xamarin Studio" this are steps to follow to solve such an error
This happens when you target your project to a non-installed Android SDK platform, to fix this you have to install the right components.
Step 1:Target another Android Framework
On the project you have created right-click the project > Options
Go to the Xamarin project configurations
Then go to Build > General > Target framework, and select other Android target framework.
Xamarin project Android target framework
Step 2:Install the Android SDK you need
As the second option you can install the missing components needed to debug on the SDK Android platform; for this you have to go to:
Tools > Open Android SDK Manager
Android SDK Manager Option
Then look at the API Level number on the error or look at the version of the target framework as stated at the previous steps; then select to install the “SDK Platform” and press the “Install 1 package” button.
Choose the right Android SDK Platform
Accept license agreements
license agreements
With this you are ready, press F5 and you can debug now.

Visual Studio 2015 Xamarin aapt.exe error package resources do not exist

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.

Android Studio: Failed to sync Gradle project

Gradle sync failed: Cause: failed to find target with hash string 'android-18' in: C:\Users\Android\sdk Consult IDE log for more details
I am finding this error every time, when importing a project into android studio.
Go into the Android SDK manager and install the platform SDK for API 18. Or, go into the project settings and change the target API and build tools versions to be what you already have installed.
I am finding this error every time, when importing a project into android studio.
For addressing this issue, you may want to change SDK level of the imported project to whatever you'd like. (However you should mak sure your chosen SDK level meets features used by the library)
For this, you should open build.gradle file of that project and change SDK level there.
defaultConfig {
minSdkVersion 4
targetSdkVersion /* SDK LEVEL */
}
Another option would be installing SDK level 18 via SDK manager.
For handling this issue, you have to update the gradle version in build.gradle of your project to latest gradle version of your android studio. After that if android studio terminal shows any of the following then
1) install the missing platform(s)
or
2) install build tools
or
3) Fix Gradle wrapper and re-import project
do that and sync your project.

"parseSdkContent failed Could not initialize class android.graphics.Typeface" in SDK Andorid 5.0

I'm getting the below error after I update the SDK Android 5.0 (API 21)
"parseSdkContent failed Could not initialize class android.graphics.Typeface"
Another thread suggested to delete .android folder, yes its works, but after sometime this error will trigger again and not able to select any Project Build Target SDK, (its allows to check the target and apply, but again open Properties->android, its showing unchecked) to build the app.
I'm using Android SDK Build Tools Rev 19.1 and Eclipse Juno. ADT version 23.0.4
Note : If my Android Project target SDK version is 20 or 19, there is no problem.
This is android package error,its corrupted android 5.0 sdk platform. Just Delete the folder <sdk>/<platforms>/<android-21> and download the android 5.0 sdk platform from sdk manager.
Got the fix. This happened because you installed a new Eclipse and loaded the 5.0 API Directly. You just have to delete the file:
".android in C:\User\\" in Windows.
After this step just install the ANDROID SDK BUILD-TOOLS revision 21
Hope it works for you :)

Unable to resolve target 'android-17'

I know there are some sort-of duplicates of this, but none of the answers have been able to help me so far.
When I open a project, I get the following error:
[2014-01-07 14:18:00 - Permissions] Unable to resolve target 'android-17'
Does anybody know what may be the problem here?
You can right click on your project -> properties -> Android -> Select the Target android version you want to compile and Apply !
If you don't have any target versions to compile, you probably need to download them on your SDK Manager
Open your Android SDK Manager, and make sure your SDK API is installed
You might have several Android SDK folders installed, like me; check that your workspace build path is the one your machine defaults to.
You are probably trying to use a library that was built using API 17 and you do not have it installed. If you are using API 18+ you will be fine.
goto your sdk manager.exe open it, check the API 17 checkbox and click the 'install x packages' button, this will download and install these packages, if the project still shows error go in your project build path and fix the library path error if any
Sometimes the error can appear when you are working with source code built with an ADT that is a higher version than what you are currently using. It could be worth it to see if ADT has a later version than you are working. Sometimes ADT (especially with Eclipse. Link to get new here: https://developer.android.com/sdk/index.html) cannot find updates when asked to find them so you may need to install the newest version and overwrite/delete the old version
The target API in project.properties may be different from the one you have installed. This may happen if you reinstall Eclipse, for example. Open the Android SDK Manager and check to see which version of the API you have installed. Then go to project.properties and set "target=android-xx" when "xx" is your API version.
It's very simple:
Click Android SDK Manager
Download Android 4.2.2 (Api 17)
After install Android 4.2.2(Api 17)
Click right on project --> Properties --> Android --> Target Build Target
Choose Android 4.2.2 Api 17.
Finish

Categories

Resources