Bug 16939 - Getting build error for Android sample AdMob
Summary: Getting build error for Android sample AdMob
Status: RESOLVED DUPLICATE of bug 18893
Alias: None
Product: Android
Classification: Xamarin
Component: Samples ()
Version: 4.12.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Ben O'Halloran
Depends on:
Reported: 2013-12-23 01:12 UTC by narayanp
Modified: 2015-03-09 15:51 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description narayanp 2013-12-23 01:12:16 UTC
Steps to reproduce:
1. Open Android sample 'AdMob'
2. Add GoogleAdMobAdsSDK-6..4.1 from AndroidSDK as a link in AdMob->Jars
3. Build the sample.

Actual Result: It is giving error "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task GetAdditionalResourcesFromAssemblies: Required property 'AndroidNdkDirectory' not set. (AdMob)"

Expected Result: Application should build successfully.

Supplement info:
Build Output: https://gist.github.com/saurabh360/c0cd9bfcd0e8c19310c0

Environment details:
All Mac 
X.S 4.2.3(build 23) - 067989d9274b9f0fbd959336e60f8a5c1a75bc48
X.Android 4.11.0-215

Regression Status:
This application builds successfully in issue https://bugzilla.xamarin.com/show_bug.cgi?id=14142
Comment 1 Peter Collins 2014-01-02 13:44:32 UTC
I was unable to reproduce this specific error, but I am concerned because I also appear to be missing my android-ndk directory in the default location[1] after installing XA 4.12. I will follow up with Marek to see if there is perhaps an issue with our latest XA installer.

[1] ~/Library/Developer/Xamarin/android-ndk/
Comment 2 Peter Collins 2014-01-02 14:58:52 UTC
My mistake, the universal installer will install the NDK, not the individual pkgs. That being said, I still was unable to reproduce this *without* XS pointing to an NDK, so I'm not entirely sure why you would be hitting this failure. This build outpu you've linked is not a clean one, as certain targets are being skipped.

Please try the following within your monodroid-samples directory and if the build fails paste the diagnostic build output (contents of buildout.txt from step 4).

> git clean -xfd
> git reset --hard HEAD
> git pull
> xbuild AdMob/AdMob/AdMob.csproj -v:diag > buildout.txt

*Note you will need to add GoogleAdMobAdsSDK-6..4.1 from AndroidSDK as a link in AdMob->Jars again before running step 4.
Comment 3 narayanp 2014-01-06 09:27:44 UTC
When I am running the step 4 from Comment#2 I am getting Output: 
MSBUILD: error MSBUILD0004: Too many project files specified

Again Pasting Build Output: https://gist.github.com/saurabh360/1b3cffab7c0db06122b4
Comment 4 narayanp 2014-01-06 09:45:14 UTC
I have tried another command "xbuild /t:Install /p:Configuration=Release /v:diag *.csproj > build.txt" and got the following build.txt output:
Comment 5 Peter Collins 2014-01-06 12:58:20 UTC
Sorry my typo, it should have been /v:diag like you have done in comment 4. The /t:Install will not be valid for this project, as it is not an application, but a library project.

Please attempt to run the following commands again from within your monodroid-samples directory:

> git clean -xfd
> git reset --hard HEAD
> git pull
> xbuild AdMob/AdMob/AdMob.csproj /v:diag > buildout.txt
Comment 6 narayanp 2014-01-30 07:19:04 UTC
This is the buildout.txt  : https://gist.github.com/saurabh360/d3b4709365e3d992ce4f

All Mac
X.S 4.2.3(build 51)
Mono 3.2.6
X.Android 4.12.0-14
Comment 7 Peter Collins 2015-03-09 15:51:09 UTC

*** This bug has been marked as a duplicate of bug 18893 ***