Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin Studio 2 - latest stable update - Error executing task Aapt: The source sequence is empty

I am using the trial version of Xamarin Studio for my final year project consisting an android application. Everything went smooth initially. But today right after updating to the latest stable version, i encountered an error (as stated on the title of this post).

The build log is as follows:

Building Solution: MyActivity.Mobile (Debug)

Building: MCAAndroid (Debug)

Build started 05/18/2013 17:04:44.

Project "/Users/hazimanabhmy/Projects/MyActivity.Mobile/MCAAndroid/MCAAndroid.csproj" (Build target(s)):

Target _CheckProjectItems: CheckProjectItems Task NativeLibraries: JavaLibraries: JavaSourceFiles:

Target _ComputeAndroidAssetsPaths: ResourceFiles: Assets/WebUI/newsfeed.html Assets/WebUI/images/bg_content.png Assets/WebUI/css/style.css Assets/WebUI/images/flag.png IntermediateFiles:

Target _GenerateAndroidAssetsDir: Skipping target "_GenerateAndroidAssetsDir" because its outputs are up-to-date.

Target _ComputeAndroidResourcePaths: ResourceFiles: Resources/values/Strings.xml Resources/drawable/Icon.png Resources/layout/Login.axml Resources/drawable/le_cool_logo.png Resources/drawable/bg.jpg Resources/drawable/icon_password.png Resources/drawable/Icon_user.png Resources/layout/Home.axml Resources/drawable/info.png Resources/drawable/settings.png Resources/drawable/help.png Resources/drawable/bg_content.png Resources/drawable/shadow_black.9.png Resources/drawable/cog.png Resources/drawable/tools.png Resources/layout/ReadMatric.axml Resources/drawable/matric.jpg Resources/drawable/mcalogo.png IntermediateFiles:

Target _GenerateAndroidResourceDir: Skipping target "_GenerateAndroidResourceDir" because its outputs are up-to-date.

Target _ResolveMonoAndroidSdks: MonoAndroid Tools: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/ MonoAndroid Framework: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/platforms/android-10;/Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1 MonoAndroid Binaries: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/bin/ Android NDK: Android SDK: /Users/hazimanabhmy/Library/Developer/Xamarin/android-sdk-mac_x86/ Java SDK: /usr/

Target _ValidateAndroidPackageProperties: GetAndroidPackageName Task ManifestFile: /Users/hazimanabhmy/Projects/MyActivity.Mobile/MCAAndroid/Properties/AndroidManifest.xml AssemblyName: MCAAndroid PackageName: MCAAndroid.MCAAndroid

Target _BuildDependencies: Resolved library outputs:

Target _ExtractLibraryProjectImports: Assemblies: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.dll /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.Xml.dll /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/platforms/android-10/Mono.Android.dll /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.Core.dll Jars: ResolvedResourceDirectories:

Target _GetLibraryImports: NativeLibraries: Jars:

Target _CheckDuplicateJavaLibraries: JavaSourceFiles: JavaLibraries:

Target _UpdateAndroidResgen: AdditionalResourceDirectories: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error : Error executing task Aapt: The source sequence is empty Task "Aapt" execution -- FAILED Done building target "_UpdateAndroidResgen" in project "/Users/hazimanabhmy/Projects/MyActivity.Mobile/MCAAndroid/MCAAndroid.csproj".-- FAILED

Done building project "/Users/hazimanabhmy/Projects/MyActivity.Mobile/MCAAndroid/MCAAndroid.csproj".-- FAILED

Build FAILED. Errors:

/Users/hazimanabhmy/Projects/MyActivity.Mobile/MCAAndroid/MCAAndroid.csproj (Build) -> /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets (_UpdateAndroidResgen target) ->

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error : Error executing task Aapt: The source sequence is empty

0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.1048310

---------------------- Done ----------------------

Build: 1 error, 0 warnings

I couldn't find the cause. Would someone help me?

I have asked this same question on Xamarin.Android's forum, and still waiting for their answer. But i think i could gather more resources and insights from experts here.

like image 730
Haziman Avatar asked May 18 '13 10:05

Haziman


1 Answers

It's a recent change/bug in Xamarin.Android that expects to be used with Android tools rev. 22 or later where appt has been moved around in the sdk directory (from tools to build-tools). You need to go into the android sdk manager and update the SDK tools to revision 22 (or better) and also install the new build-tools package. enter image description here

like image 100
Johannes Rudolph Avatar answered Oct 06 '22 13:10

Johannes Rudolph