Bug 20605 - Xam 3.1 Alpha: AIDL using android.os.Bundle gets bad case translation to Android.Os.Bundle (should be Android.OS.Bundle)
Summary: Xam 3.1 Alpha: AIDL using android.os.Bundle gets bad case translation to Andr...
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Pre-release ()
Version: 4.14.0
Hardware: PC Windows
: Highest blocker
Target Milestone: 4.14.0
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2014-06-15 18:46 UTC by T.J. Purtell
Modified: 2014-07-22 13:34 UTC (History)
4 users (show)

Tags:
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:
Status:
VERIFIED FIXED

Description T.J. Purtell 2014-06-15 18:46:05 UTC
The latest Alpha to Xamarin for Android has broken the AIDL support.  If you need to use the type android.os.Bundle in your AIDL, you will not be able to compile the project.

>C:\Users\tj\Developer\makax\Components\Xamarin.InAppBilling\obj\Debug\aidl\IInAppBillingService.cs(15,22,15,28): error CS0234: The type or namespace name 'Bundle' does not exist in the namespace 'Android.Os' (are you missing an assembly reference?)

An example project which shows this issue is here.
https://github.com/prashantvc/AndroidInAppBillingDemo

The problem is generic and affects other AIDL as well.
Comment 1 Udham Singh 2014-06-16 07:16:45 UTC
I have checked this issue with sample project provided in bug description and able to reproduce this. Please refer the screencast : http://www.screencast.com/t/dB0ZIBN5

Environment Info : 

Widows 8.1
Visual Studio 2013
Xamarin 3.1.198.0
Comment 2 Atsushi Eno 2014-06-17 03:32:45 UTC
There is some assembly reference resolution issue (as expected).

From 4.12:

Task "GenerateManagedAidlProxies"
Using task GenerateManagedAidlProxies from Xamarin.Android.Tasks.GenerateManagedAidlProxies, Xamarin.Android.Build.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Task GenerateManagedAidlProxies
References:
../Components/json.net-4.5.11/lib/android/Newtonsoft.Json.dll
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.dll
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.Xml.dll
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v2.2/Mono.Android.dll
/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.Core.dll
SourceAidlFiles:
Budle.aidl
IInAppBillingService.aidl
...

with master and 4.14:

Task "GenerateManagedAidlProxies"
Using task GenerateManagedAidlProxies from Xamarin.Android.Tasks.GenerateManagedAidlProxies, Xamarin.Android.Build.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Task GenerateManagedAidlProxies
References:
SourceAidlFiles:
Budle.aidl
IInAppBillingService.aidl
...
Comment 4 Atsushi Eno 2014-06-17 07:11:53 UTC
Should be fixed. Thanks for the report.

[master 352c3b3] [monodroid-4.14-series e282252]
Comment 5 T.J. Purtell 2014-07-20 18:06:21 UTC
I updated to the 3.3 beta channel today and I am seeing this error again.
Comment 6 Saurabh 2014-07-21 02:18:20 UTC
I have checked this issue using attached sample with beta XamarinVS 3.3.39 and I am also getting this issue. This is the build output for the same: https://gist.github.com/saurabh360/e82a3132c9787736c6b6


VS 2013/2012/
Xamarin   3.3.39.0 (e0231991c29b7685fa7bc2057a11b6d508128782)
Comment 7 Jonathan Pryor 2014-07-21 14:12:43 UTC
The problem is that the GenerateManagedAidlProxies task isn't getting any assembly references:

OS X (works):

> Target _RunManagedAidlTool:
> Task "GenerateManagedAidlProxies"
> 	Using task GenerateManagedAidlProxies from Xamarin.Android.Tasks.GenerateManagedAidlProxies, Xamarin.Android.Build.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
> 	Task GenerateManagedAidlProxies
> 	  References:
> 	    ../Components/json.net-4.5.11/lib/android/Newtonsoft.Json.dll
> 	    /Users/jon/Development/xamarin/monodroid/out/lib/xbuild-frameworks/MonoAndroid/v1.0/System.dll
> 	    /Users/jon/Development/xamarin/monodroid/out/lib/xbuild-frameworks/MonoAndroid/v1.0/System.Xml.dll
> 	    /Users/jon/Development/xamarin/monodroid/out/lib/xbuild-frameworks/MonoAndroid/v2.2/Mono.Android.dll
> 	    /Users/jon/Development/xamarin/monodroid/out/lib/xbuild-frameworks/MonoAndroid/v1.0/System.Core.dll
> 	    /Users/jon/Development/xamarin/monodroid/out/lib/xbuild-frameworks/MonoAndroid/v1.0/mscorlib.dll
> 	  SourceAidlFiles:
> 	    Budle.aidl
> 	    IInAppBillingService.aidl
> 	  IntermediateOutputDirectory: obj/Debug/
> 	  OutputNamespace: 
> 	  ParcelableHandlingOption: 
> 	Written ... obj/Debug/aidl/Budle.cs
> 	Written ... obj/Debug/aidl/IInAppBillingService.cs
> Done executing task "GenerateManagedAidlProxies"


Windows (fails):

> Task "GenerateManagedAidlProxies" (TaskId:60)
>   Task Parameter:
>       SourceAidlFiles=
>           Budle.aidl
>           IInAppBillingService.aidl (TaskId:60)
>   Task Parameter:IntermediateOutputDirectory=obj\Debug\ (TaskId:60)
>   Task GenerateManagedAidlProxies (TaskId:60)
>     References: (TaskId:60)
>     SourceAidlFiles: (TaskId:60)
>       Budle.aidl (TaskId:60)
>       IInAppBillingService.aidl (TaskId:60)
>     IntermediateOutputDirectory: obj\Debug\ (TaskId:60)
>     OutputNamespace:  (TaskId:60)
>     ParcelableHandlingOption:  (TaskId:60)
>   Written ... obj\Debug\aidl\Budle.cs (TaskId:60)
>   Written ... obj\Debug\aidl\IInAppBillingService.cs (TaskId:60)
> Done executing task "GenerateManagedAidlProxies". (TaskId:60)


Notice that the References: line is empty on Windows, which is @(ReferencePath).
Comment 8 Jonathan Pryor 2014-07-21 14:14:31 UTC
The fix is to use "@(ReferencePath);@(ReferenceDependencyPaths)", not @(ReferencePath), as is done in master/1839e05f (the Bug #18372 fix).
Comment 9 Jonathan Pryor 2014-07-21 14:18:47 UTC
Should be fixed in monodroid-4.14-series/7c475463.
Comment 10 Udham Singh 2014-07-22 11:36:32 UTC
I have checked this issue again and this is working fine on mac. Here is the screencast : http://screencast.com/t/xYxstuWP

On windows I am still getting the same issue.

Environment Info : 

=== Xamarin Studio ===

Version 5.2 (build 384)
Installation UUID: 561c7a69-0a91-4bae-ad7c-f0c79d594337
Runtime:
	Mono 3.6.0 ((no/f540f8a)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 306000039

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.iOS ===

Version: 7.2.6.25 (Business Edition)
Hash: 1967a15
Branch: 
Build date: 2014-07-21 11:54:55-0400

=== Xamarin.Android ===

Version: 4.14.0 (Business Edition)
Android SDK: /Users/tajinder/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Xamarin.Mac ===

Version:

=== Build Information ===

Release ID: 502000384
Git revision: 09e06441e39ea272ddda63758fd53013157f7e45
Build date: 2014-07-16 11:15:54-04
Xamarin addins: 2d11dd4dad5b35ca83f24d70e965792a47be8291

=== Operating System ===

Mac OS X 10.8.4
Darwin Tajinders-iMac.local 12.4.2 Darwin Kernel Version 12.4.2
    Mon Jun 17 18:00:12 PDT 2013
    root:xnu-2050.45.8~1/RELEASE_X86_64 x86_64
Comment 11 Udham Singh 2014-07-22 13:34:56 UTC
I have checked this issue on windows, now this is working fine. Hence closing this issue.

Screencast : http://screencast.com/t/JzcY9xs0aBsS

Environment Info :

Microsoft Visual Studio Professional 2013
Version 12.0.30501.00 Update 2
Microsoft .NET Framework
Version 4.5.50938

Xamarin   3.3.44.0 (48bc8a484441700b633a09133e208654bf62fa12)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android