Bug 24061 - Cannot load crouton library to API 16
Summary: Cannot load crouton library to API 16
Status: RESOLVED DUPLICATE of bug 23982
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 5.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2014-10-26 22:06 UTC by Cody Beyer (MSFT)
Modified: 2014-11-10 20:24 UTC (History)
3 users (show)

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


Attachments
logcat (116.49 KB, text/plain)
2014-10-29 15:58 UTC, Cody Beyer (MSFT)
Details


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:
RESOLVED DUPLICATE of bug 23982

Description Cody Beyer (MSFT) 2014-10-26 22:06:45 UTC
#### Description

When attempting to load the Crouton notification library to devices running API 16, the build fails with the below error

#### Error

 Reason: Could not load assembly 'CroutonLibrary, Version=, Culture=neutral, PublicKeyToken=null'. Perhaps it doesn't exist in the Mono for Android profile? (XA0000) (Dell.DDPMobile.DroidApp)

#### Test Case

https://www.dropbox.com/s/vixtwsh0e6ghl20/AndroidCrouton.zip?dl=0

#### Steps to reproduce  

1. Download, Unzip and Load test case (above)
2. Build and deploy test case onto api 16 emulator
3. notice app crashes at launch

### Working Solution

Build same project and deploy to API 19 simulator

### Video

https://www.dropbox.com/s/sijs7x2t8yzzypf/WVTest.mov?dl=0
Comment 1 narayanp 2014-10-27 06:35:02 UTC
I have tried to reproduce this issue. I have downloaded test case sample from 
https://www.dropbox.com/s/vixtwsh0e6ghl20/AndroidCrouton.zip?dl=0. I opened this test case sample in XS. I observed that "CroutonLibrary" does not load into opened solution. I deploy this sample onto API-16 emulator then application crashes at launch. If I deploy the same test case sample onto API-19 emulator then it deploys and runs successfully.

Screencast: http://www.screencast.com/t/lIOup1iaSx
IDE log: https://gist.github.com/sunil360/48b7664b0e00569c34c8

I’ll need confirmation from the developer if this is a bug. Leaving as NEW for now.

Environment info:
=== Xamarin Studio ===

Version 5.5.2 (build 8)
Installation UUID: 561c7a69-0a91-4bae-ad7c-f0c79d594337
Runtime:
	Mono 3.10.0 ((detached/e204655)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000023

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.Mac ===

Version: 1.11.1.3 (Business Edition)

=== Xamarin.Android ===

Version: 4.18.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)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: /usr
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.iOS ===

Version: 8.4.0.14 (Business Edition)
Hash: 1d464a1
Branch: 
Build date: 2014-10-17 21:50:07-0400

=== Build Information ===

Release ID: 505020008
Git revision: 8e7f48e6b9afaa3f6ef68443d452d69d121ce051
Build date: 2014-10-16 09:25:16-04
Xamarin addins: 069ddd29bb70a42238142eee9bac21a5e4b2f9f9

=== 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 2 Jonathan Pryor 2014-10-29 14:27:31 UTC
> I observed that "CroutonLibrary" does not load into opened solution.

This is because the .sln mentions CroutonLibrary\CroutonLibrary.csproj, which doesn't exist within the .zip. Fortunately, AndroidCrouton.csproj doesn't have a <ProjectReference/> for it, so it's an ignorable warning.

> I deploy this sample onto API-16 emulator then application crashes at launch

As always... `adb logcat` output?

At 0:14 of the screencast, the Application Output contains:

> [AndroidRuntime] Caused by: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_19 or Xamarin.Android...
> [AndroidRuntime]        at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:38)
> [AndroidRuntime]        at android.app.ActivityThread.installProvider(ActivityThread.java:4560)
> [AndroidRuntime]        ... 12 more
> [AndroidRuntime] Caused by: android.content.pm.PackageManager$NameNotFoundException: Xamarin.Android.Platform

...which looks like there's something wrong with your install, as that package should no longer be used, generated, or exist, since Bug #22074. Which Xamarin.Android version are you on? Have you tried nuking the bin & obj directories?

The fact that it works at 0:31 suggests that this isn't an actual problem.
Comment 3 Jonathan Pryor 2014-10-29 14:28:34 UTC
@Cody The screencast in Comment #0 makes no sense at all; it doesn't look anything like the screencast in Comment #1, doesn't look anything like the app running locally (which looks like Comment #1), and shows no errors that I can see.
Comment 4 Cody Beyer (MSFT) 2014-10-29 14:40:04 UTC
Sorry....

Here is the correct video.. Copy paste error: https://www.dropbox.com/s/kn563ce68uif6tr/ToastBug.mov?dl=0
Comment 5 Jonathan Pryor 2014-10-29 14:42:21 UTC
@narayanp: You may want/need to manually uninstall all Mono* and Xamarin* packages from the target devices, then reinstall from the IDE.
Comment 6 Cody Beyer (MSFT) 2014-10-29 15:58:35 UTC
Created attachment 8553 [details]
logcat

@jonp

After a complete reinstall, I am still getting the following error:

[AndroidRuntime] Caused by: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_19 or Xamarin.Android.Platform!
[AndroidRuntime] 	at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:38)
[AndroidRuntime] 	at android.app.ActivityThread.installProvider(ActivityThread.java:4560)


Here is my version information:

=== Xamarin Studio ===

Version 5.6.2 (build 5)
Installation UUID: 3e4348fa-e0b3-46a4-8426-58f27e19159e
Runtime:
	Mono 3.10.0 ((detached/633e444)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000020

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.Mac ===

Version: 1.10.0.18 (Business Edition)

=== Xamarin.Android ===

Version: 4.18.0 (Business Edition)
Android SDK: /Users/codybeyer/Library/Developer/Xamarin/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)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.2   (API level 17)
		4.4   (API level 19)
Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

=== Xamarin.iOS ===

Version: 8.4.0.15 (Business Edition)
Hash: 08968c4
Branch: 
Build date: 2014-10-20 21:48:06-0400

=== Build Information ===

Release ID: 506020005
Git revision: 19bc3b64b70332bfab18faf9cf1ce7d3aa191b36
Build date: 2014-10-17 14:49:01-04

=== Operating System ===

Mac OS X 10.10.0
Darwin Codys-MacBook-Pro.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64


Logcat is attached
Comment 7 Cody Beyer (MSFT) 2014-11-04 11:23:18 UTC
Requested info added
Comment 8 Peter Collins 2014-11-10 20:24:02 UTC

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