Bug 16801 - App Crash with Google Play Services Gingerbread trying to use ActionBarActivity
Summary: App Crash with Google Play Services Gingerbread trying to use ActionBarActivity
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.10.1
Hardware: PC Windows
: --- major
Target Milestone: 4.12.3
Assignee: Radek Doulik
URL:
: 18055 ()
Depends on:
Blocks:
 
Reported: 2013-12-14 14:48 UTC by James Montemagno [MSFT]
Modified: 2014-03-04 11:27 UTC (History)
18 users (show)

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


Attachments
Sample app (60.43 KB, application/zip)
2013-12-14 14:48 UTC, James Montemagno [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:
VERIFIED FIXED

Description James Montemagno [MSFT] 2013-12-14 14:48:50 UTC
Created attachment 5661 [details]
Sample app

This issue only occurs on the PC inside of either Xamarin Studio or Visual Studio. It will deploy fine from Xamarin Studio OSX. In this sample I am adding in the Google play Services for Gingerbread. This also adds in the AppCompat of the v7 library. 

When I build the application it is fine, but when I deploy it crashes with this:

[mono]   --- End of managed exception stack trace ---
[mono] java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
[mono] 	at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:98)
[mono] 	at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58)
[mono] 	at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
[mono] 	at googleplussignin.MainActivity.n_onCreate(Native Method)
[mono] 	at goo
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: Java.Lang.NoClassDefFoundError: Exception of type 'Java.Lang.NoClassDefFoundError' was thrown.
[mono-rt] at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue[]) <0x001dc>
[mono-rt] at Android.App.Activity.OnCreate (Android.OS.Bundle) <0x001ef>
[mono-rt] at GooglePlusSignIn.MainActivity.OnCreate (Android.OS.Bundle) <0x0004f>
[mono-rt] at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) <0x0005b>
[mono-rt] at (wrapper dynamic-method) object.761ce433-2cf8-4b61-b2fc-17fcaf090edd (intptr,intptr,intptr) <0x00043>
[mono-rt] 
[mono-rt]   --- End of managed exception stack trace ---
[mono-rt] java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
[mono-rt] 	at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:98)
[mono-rt] 	at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58)
[mono-rt] 	at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
[mono-rt] 	at googleplussignin.MainActivity.n_onCreate(Native Me
Comment 1 web 2013-12-14 15:04:00 UTC
This problem exists also with Google Play Services for Froyo and exists here since adding AppCompat componente to the project.
Comment 2 Atsushi Eno 2014-01-08 13:11:56 UTC
The problem is in Android.IncludeAndroidResourcesFromAttribute's approach.

Basically, when we have to bundle resources in a binding dll, there should also be AndroidManifest.xml, which is "built" by ant (or eclipse ADT indirectly).
When LibraryProjectZip is used, that file is actually packaged into the zip (as bin/AndroidManifest.xml, or (topdir)AndroidManifest.xml for .aar package), and we do extract and read that file, to retrieve the android package name of the library.

So probably we need another attribute to specify that android package name for the bound library. This also means one dll can most likely specify one library package at most (that is what Java library expects by full name anyways).
Comment 4 Atsushi Eno 2014-01-08 13:26:24 UTC
Also, this should actually occur on any platform.
Comment 7 Tomasz Cielecki 2014-01-13 11:22:11 UTC
This is also a problem with the Play Service component, i.e. when trying to
inflate a "com.google.android.gms.maps.MapView".

<?xml version="1.0" encoding="utf-8"?>
<com.google.android.gms.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/mapView" />

var view = inflater.Inflate(Resource.Layout.Location, container, false);

Produces the following nasty exception:

01-13 17:09:27.186 W/dalvikvm(12006): VFY: unable to resolve static field 3373
(MapAttrs) in Lcom/google/android/gms/R$styleable;
01-13 17:09:27.186 D/dalvikvm(12006): VFY: replacing opcode 0x62 at 0x000e
An unhandled exception occured.
01-13 17:09:33.176 I/MonoDroid(12006): UNHANDLED EXCEPTION:
Android.Views.InflateException: Exception of type
'Android.Views.InflateException' was thrown.
01-13 17:09:33.176 I/MonoDroid(12006): at
Android.Runtime.JNIEnv.CallObjectMethod
(intptr,intptr,Android.Runtime.JValue[]) [0x00064] in
/Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.1-branch/d23a19bf/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:194
01-13 17:09:33.176 I/MonoDroid(12006): at Android.Views.LayoutInflater.Inflate
(int,Android.Views.ViewGroup,bool) [0x00043] in
/Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.1-branch/d23a19bf/source/monodroid/src/Mono.Android/platforms/android-14/src/generated/Android.Views.LayoutInflater.cs:609
01-13 17:09:33.176 I/MonoDroid(12006): at
SetupCompanion.Droid.Views.Fragments.LocationFragment.OnCreateView
(Android.Views.LayoutInflater,Android.Views.ViewGroup,Android.OS.Bundle)
[0x00130] in
c:\ENM\Main\src\prod\Mobile\SetupCompanion\SetupCompanion.Droid\Views\Fragments\LocationFragment.cs:92
01-13 17:09:33.176 I/MonoDroid(12006): at
Android.Support.V4.App.Fragment.n_OnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_os_Bundle_
(intptr,intptr,intptr,intptr,intptr) <IL 0x00026, 0x0019f>
01-13 17:09:33.176 I/MonoDroid(12006): at (wrapper dynamic-method)
object.c10b378f-4e8e-46c9-ad61-81a4199d026c
(intptr,intptr,intptr,intptr,intptr) <IL 0x00023, 0x0005f>
01-13 17:09:33.176 I/MonoDroid(12006): 
01-13 17:09:33.176 I/MonoDroid(12006):   --- End of managed exception stack
trace ---
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.ViewGroup.measureC01-13 17:09:33.176 I/MonoDroid(12006):
android.view.InflateException: Binary XML file line #1: Error inflating class
com.google.android.gms.maps.MapView
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.LayoutInflater.createView(LayoutInflater.java:620)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.LayoutInflater.inflate(LayoutInflater.java:469)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.LayoutInflater.inflate(LayoutInflater.java:397)
01-13 17:09:33.176 I/MonoDroid(12006):     at
setupcompanion.droid.views.fragments.LocationFragment.n_onCreateView(Native
Method)
01-13 17:09:33.176 I/MonoDroid(12006):     at
setupcompanion.droid.views.fragments.LocationFragment.onCreateView(LocationFragment.java:34)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.support.v4.app.Fragment.performCreateView(Fragment.java:1478)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1460)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:472)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:141)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.support.v4.view.ViewPager.populate(ViewPager.java:1068)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.support.v4.view.ViewPager.populate(ViewPager.java:914)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1436)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.View.measure(View.java:16497)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:719)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.widget.RelativeLayout.onMeasure(RelativeLayout.java:455)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.View.measure(View.java:16497)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.View.measure(View.java:16497)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
01-13 17:09:33.176 I/MonoDroid(12006):     at
com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:327)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.View.measure(View.java:16497)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
01-13 17:09:33.176 I/MonoDroid(12006):     at
com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2556)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.View.measure(View.java:16497)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1916)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1113)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1295)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5670)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
01-13 17:09:33.176 I/MonoDroid(12006):     at
android.view.Choreographer.doCallbacks(Choreographer.java:574)
01-13 17:09:33.176 I/MonoDroid(12006):     at android.view.Choreographer.doF
01-13 17:09:33.426 W/dalvikvm(12006): JNI WARNING: JNI function GetMethodID
called with exception pending
In mgmain JNI_OnLoad
01-13 17:09:33.426 W/dalvikvm(12006):              in
Lsetupcompanion/droid/views/fragments/LocationFragment;.n_onCreateView:(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
(GetMethodID)
01-13 17:09:33.426 W/dalvikvm(12006): Pending exception is:
01-13 17:09:33.426 I/dalvikvm(12006): android.view.InflateException: Binary XML
file line #1: Error inflating class com.google.android.gms.maps.MapView
01-13 17:09:33.426 I/dalvikvm(12006):   (raw stack trace not found)
Unhandled Exception:

Android.Views.InflateException: Loading...
01-13 17:09:33.426 I/dalvikvm(12006): Caused by:
01-13 17:09:33.426 I/dalvikvm(12006):
java.lang.reflect.InvocationTargetException:
01-13 17:09:33.466 I/dalvikvm(12006):   at
android.support.v4.app.Fragment.performCreateView(F01-13 17:09:33.426
I/dalvikvm(12006):   (raw stack trace not found)
01-13 17:09:33.426 I/dalvikvm(12006): Caused by:
01-13 17:09:33.426 I/dalvikvm(12006): java.lang.NoClassDefFoundError:
com.google.android.gms.R$styleable
01-13 17:09:33.426 I/dalvikvm(12006):   (raw stack trace not found)
01-13 17:09:33.426 I/dalvikvm(12006): "main" prio=5 tid=1 NATIVE
01-13 17:09:33.426 I/dalvikvm(12006):   | group="main" sCount=0 dsCount=0
obj=0x41502ca8 self=0x2a00d3e0
01-13 17:09:33.426 I/dalvikvm(12006):   | sysTid=12006 nice=0 sched=0/0
cgrp=apps handle=1073815892
01-13 17:09:33.426 I/dalvikvm(12006):   | state=R schedstat=( 0 0 0 ) utm=414
stm=38 core=1
01-13 17:09:33.456 I/dalvikvm(12006):   #00  pc 0000132e 
/system/lib/libcorkscrew.so (unwind_backtrace_thread+29)
The program 'Mono' has exited with code 0 (0x0).
Comment 11 web 2014-01-17 15:06:52 UTC
Sorry to ask, but do you think there is any chance to get a working Google Play Services component in the next days? I stopped my development on the Android version of my app for the last for weeks because of this problem. But now the deadline is getting closer...
Comment 12 Erik F. Andersen 2014-01-21 02:46:47 UTC
I have successfully used Google Play Services (Gingerbread) and ActionBarActivity from Xamarin Studio on a Mac computer.
Comment 13 web 2014-01-23 07:27:25 UTC
Yes, it seems to work on Mac, but not on Windows. 

Meanwhile I think no one on Xamarin is interessted in this problem, because all use a Mac for development :(
Comment 14 Radek Doulik 2014-01-24 12:30:12 UTC
I think it is regression of the build performance improvements. I fixed it in the repo. On Mac I was able to reproduce it and it is fixed now. I will retest it on Windows XS once the build finishes.
Comment 15 web 2014-01-24 14:45:59 UTC
Do you know any date, where this will be happen?
Comment 16 Pavel Kouznetcov 2014-01-29 16:36:18 UTC
This is really critical issue for me, could be so kind, please, and at least provide ETA of possible fix, right now it looks like you've left it for backlog.
Comment 17 PJ 2014-01-29 16:51:31 UTC
The fix is slated for the 4.12.0 release, and getting the fix into that release is part of the reason why it hasn't come out of Alpha yet. 

Once the fix has been landed by Radek onto the release branch, the turnaround time on getting the fix onto the Alpha channel should be no more than a day or two.

It does seem like this might need an update from Radek though, comment 14 indicates we weren't too far away from having the fix ready to go. Updating status to IN_PROGRESS.
Comment 18 Radek Doulik 2014-02-03 12:44:26 UTC
Runs OK with XS/Windows XA 4.12-series build. The commit with the fix is 58522ad69ba280a0fbb4a0734daef14e59bfd3cd in 4.12-series branch.
Comment 19 web 2014-02-05 03:39:11 UTC
I downloaded the XA 4.12.0 from Alpha channel and tried it. 

I get now the following error when compiling with Google Play Services (Gingerbread)

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error MSB4115: The "exists" function only accepts a scalar value, but its argument "@(_AdditionalAndroidResourceManifests)" evaluates to "C:\Entwicklung\WF.Player.Android\Components\googleplayservicesgingerbread-13.0\lib\android\13\content\google-play-services/libproject/google-play-services_lib\AndroidManifest.xml;C:\Entwicklung\WF.Player.Android\Components\googleplayservicesgingerbread-13.0\lib\android\18\content\support/v7/appcompat\AndroidManifest.xml" which is not a scalar value. (MSB4115) (WF.Player.Android)

After this, I removed the component from the project, removed all occurences in the component folder and downloaded it again. Same problem.

This component is now nearly 2 month in the component store. It worked since than never on Windows based machines. It would be very nice, if we could get a solution for this in the next few days. Time is running and the project is down for nearly 2 month.
Comment 20 PJ 2014-02-05 05:44:14 UTC
Hi, sorry - the fix in comment 18 is not quite yet out in the current alpha. It should be coming out tomorrow in the beta (and alpha) channels.
Comment 21 narayanp 2014-02-06 07:46:42 UTC
I have build attached project in XS as well as in VS. It is giving me build error. This is the gist for the same: https://gist.github.com/saurabh360/aa38f3fb407c0eaeb3e2

All Windows and Mac
X.S 4.2.3(Build 54)
X.Android 4.12.0-22

Please let me know have I missed any step here?
Comment 22 web 2014-02-14 05:33:27 UTC
Sorry to ask, but when do you think is tomorrow of 2014-02-05? I don't find any alpha version regarding this bug. Do you think, it is possible to have a version of Google Play, that works on Window machines? Did I missed anything?

I'm waiting now for 2 month of a solution for this problem. Do you think it is possible to get one? Or have I to change from Windows to Mac? Is there no support for Windows, only for Mac?
Comment 23 PJ 2014-02-14 11:33:36 UTC
Xamarin.Android 4.12.0.22 was released to the Beta channel on 2014-02-06, which contains the fix mentioned in comment 18. It's not explicitly mentioned in the release notes, sorry about that.

Are you still able to reproduce the issue with that build?
Comment 24 web 2014-02-16 14:38:36 UTC
Thank you for this information. I downloaded the Beta channel and now have the following versions

=== Xamarin Studio ===

Version 4.2.3 (build 54)
Installation UUID: 49dd8a02-64da-4951-950e-add05ba1be0f
Runtime:
	Microsoft .NET 4.0.30319.18063
	GTK+ 2.24.22 theme: MS-Windows
	GTK# (2.12.0.0)

=== Xamarin.Android ===

Version: 4.12.0 (Indie Edition)
Android SDK: C:\Tools\android-sdk
	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.3   (API level 18)
		4.4   (API level 19)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode, sharing)

=== Build Information ===

Release ID: 402030054
f3fd2a8582693cd1728166bcfc17056235cb5b05
Build date: 2014-02-03 12:12:43Z
Xamarin addins: b992974cc7bee7713bba6abaf2b4fac94e67dd1c

=== Operating System ===

Windows 6.1.7601.65536 (64-bit)

What I get is again an error

Java.Lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
  at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue[]) [0x00084] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/eb8e9b5f/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:895
  at Android.App.Activity.OnCreate (Android.OS.Bundle) [0x00070] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/eb8e9b5f/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Android.App.Activity.cs:1958
  at WF.Player.CartridgesActivity.OnCreate (Android.OS.Bundle) [0x00001] in c:\Entwicklung\WF.Player.Android\CartridgesActivity.cs:52
  at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/eb8e9b5f/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Android.App.Activity.cs:1943
  at at (wrapper dynamic-method) object.432b7c6e-ec1c-48c6-bcd8-d2a5d57924de (intptr,intptr,intptr) <IL 0x00017, 0x00043>
  at --- End of managed exception stack trace ---
  at java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
  at at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:98)
  at at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58)
  at at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
  at at wf.player.CartridgesActivity.n_onCreate(Native Method)
  at at wf.player.CartridgesActivity.onCreate(CartridgesActivity.java:31)
  at at android.app.Activity.performCreate(Activity.java:5104)
  at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
  at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2262)
  at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358)
  at at android.app.ActivityThread.access$600(ActivityThread.java:153)
  at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
  at at android.os.Handler.dispatchMessage(Handler.java:99)
  at at android.os.Looper.loop(Looper.java:137)
  at at android.app.ActivityThread.main(ActivityThread.java:5263)
  at at java.lang.reflect.Method.invokeNative(Native Method)
  at at java.lang.reflect.Method.invoke(Method.java:511)
  at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
  at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
  at at dalvik.system.NativeStart.main(Native Method)

It seems, that it is the same error. Sorry. 

Any other suggestions?
Comment 25 Radek Doulik 2014-02-17 10:04:00 UTC
Try to Rebuild All (Ctrl-F8), maybe there's some dependency issue?

I retested the Sample app attached to this bug on XS/Win with Xamarin Android 4.12.0 from Alpha channel and it worked OK.

If it still doesn't solve your issue, could you please attach your application sources here to the bug report?
Comment 26 web 2014-02-17 10:30:28 UTC
Ok, I used the Beta channel, because you wrote, that I can find the new version there. Now you talk about the Alpha channel. I had to test this, but could do this not before Wednesday.

Could someone else, who had this problem, reproduce this behavior on a Windows system?
Comment 27 Radek Doulik 2014-02-17 10:47:14 UTC
I think the packages in Alpha and Beta should be the same at this point, version 4.12.00022.
Comment 28 Peter Collins 2014-02-17 15:04:04 UTC
I was unable to reproduce this crash using the attached sample and version of 4.12 in both Beta and Alpha channels. 

I did see a crash with the attached sample on a Nexus 5 with ART enabled, but this was not the same issue that this bug has been filed against. I have reported it as Bug #17828.

I believe that a clean / rebuild should resolve this as Radek has suggested.
Comment 29 Ram Chandra 2014-02-18 05:12:45 UTC
I have verified this issue on below environments:

Windows
Xamarin Studio 4.2.4 (build 17)
Xamarin.Android 4.12.0 
Build Information 
Release ID: 402040017
Git revision: 00b6aafbd9d5b59499aa5f9e7ba274f55ed95d5d
Xamarin addins: 2debf1c1984b1d3d8312decda84dc966b7412433

I followed below steps:
1. Opened attached project in XS
2. Added component in project.
3. Debug application and observed that application is deployed on emulator successfully.
4. I performed some action on running application and noticed that application have not crashed 

Refer screen cast:http://screencast.com/t/ZROrKBaxlz

Let us know if I am missing anything.
Comment 30 Tomasz Cielecki 2014-02-19 20:52:47 UTC
There seems to be a problem with the plugin for Visual Studio at least ignoring the fact that paths to the java source inside the Components folder can get ridiculously long, and in these cases it seems to throw these errors. Moving the project somewhere, which can cope with the long file paths it works just fine.
Comment 31 web 2014-02-20 07:04:43 UTC
So, now I had some time to test it. The given project works perfect, with my project I get the same error.

I removed the app from the smartphone. I deleted the obj and bin folders. I used Ctrl-F8 to rebuild the project. Results:

- With the "Android Support Library v7 AppCombat (7.18.0) all works perfect
- With the "Google Play Service (Gingerbread) I get the above mentioned error (even with Theme="@style/Theme.AppCompat.Light")

The problem occures only for ActionBarActivitys. Normal Activitys work perfect.

Btw. I didn't find a place, where I could see, which version of Xamarin.Android I use. At <Help><Info...> I only see 4.12.0, not 4.12.00022. Is there any place, where I could find the correct version?
Comment 32 web 2014-02-20 12:09:07 UTC
So, I tested a little bit more.

The v4 and v7 dlls from the Goggle Play component are the same as the normal v4 and v7 components. If I use only this two dlls from the Google Play component, than all works.

Than I add only the GooglePlayServicesLib.dll and don't change anything else. I don't use any part from this dll. When I do this, I get the above error. This is independent from the Theme I use (own theme or @style/Theme.AppCompat.Light).
Comment 33 web 2014-02-22 10:13:41 UTC
Ok, I found the reason, why the app crashes. It's because I'm using TestFlightBinding.dll. If I remove TestFlight, than the app runs normal. I don't know, why it is so, but it is :(.

I use the TestFlight binding from the Github repository "BehindTheCode" (https://github.com/BehindTheCode/TestFlight-Xamarin.Android). Perhaps someone has an idea :).
Comment 34 Radek Doulik 2014-02-24 09:12:35 UTC
Could you please open a new bug and add a sample app which reproduces your issue, so that I could try to reproduce it?
Comment 35 web 2014-02-24 09:24:09 UTC
@Radek: Thank you for your help, but TestFlight stops their service for Android at 2014-03-21. So I had to look for another Beta distributation and bug report service.

If you still want to test it: add the TestFlight dll to the above projectand you will get the error (be sure to clean all and delete the obj and bin folders).

Thanks again for all the help.
Comment 36 PJ 2014-02-24 11:13:27 UTC
Thanks for the updates, glad you're back up and running again!

Marking as verified as per https://bugzilla.xamarin.com/show_bug.cgi?id=16801#c29
Comment 37 ErikCrave 2014-02-26 03:19:00 UTC
It doesn't seem to be completely fixed yet. When I run the attached project it will launch successfully the first time, but if I then rebuild (Project -> Rebuild All) the project it will throw the reported NoClassDefFoundError again.

Xamarin Studio 4.2.3
Xamarin Android 4.12.0
Windows 8
Comment 40 Tomasz Cielecki 2014-02-26 17:34:04 UTC
Oops. Something went wrong with 4.12.0. As soon as you have multiple Binding libraries from Components this issue appears again.
Comment 41 PJ 2014-02-28 14:08:16 UTC
*** Bug 18055 has been marked as a duplicate of this bug. ***
Comment 42 PJ 2014-02-28 19:42:41 UTC
The remaining issue would occur during a clean/rebuild cycle, and is fixed in the 4.12.1 release. 4.12.1 is currently in the beta and alpha channels.
Comment 43 PJ 2014-03-04 11:27:12 UTC
*** Bug 18054 has been marked as a duplicate of this bug. ***