Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Android] Include basic proguard file so starting Xamarin Forms project can release with proguard enabled #2709

Closed
PureWeen opened this issue May 15, 2018 · 6 comments

Comments

@PureWeen
Copy link
Contributor

PureWeen commented May 15, 2018

Description

The current starter Xamarin Forms Android project will not deploy as is with proguard enabled.

The minimum configuration currently required is a proguard file with the following entry

-keep class android.support.v7.widget.FitWindowsFrameLayout { *; }
-dontwarn android.support.v7.widget.FitWindowsFrameLayout

The support libraries all include proguard.txt files as part of their nuget packages so Xamarin Forms could also include the above minimum.

It is debatable whether this is useful since as a user grows an application and uses more things they are going to have to learn how to interact with proguard and modify the file. It is just the inevitable outcome of having proguard enabled.

Though having the baseline function would probably stop people from creating issues and indicating that it's a defect of Xamarin Forms

Steps to Reproduce

  • Create a new Xamarin Forms Mobile App.
  • Under Android options, enabled either "ProGuard"
  • Set Linker to Link SDK Assemblies
  • Deploy to a device.

Expected Behavior

App to launch successfully.

Actual Behavior

Crashes on launch.

Basic Information

  • Version with issue: 3.0.0.446417
  • Last known good version: 2.5.1.527436
  • IDE: Visual Studio Enterprise 2017 v15.7.1
  • Platform Target Frameworks:
    • Android: 8.1

.NET Framework 4.7.2
Android SDK Platform-Tools 27.0.1
Android SDK Build-Tools 27.0.3
Proguard 6.0.3
JDK 8 Update 171
Android NDK R17

Reproduction Link

App1.zip

RELATED Tickets

#2671
#2491
#2457
#2495
#5742

@jonathanpeppers
Copy link
Member

The way Xamarin.Android works, it creates a rule for any class that generates a Java ACW. This is so that any C# type that extends a Java type won't need a proguard rule.

Since the failure here is android.support.v7.widget.FitWindowsFrameLayout, Xamarin.Forms is probably not subclassing it, but just using it.

Maybe there is something we need to do in the support library? @Redth ?

@programmation
Copy link

Having the ProGuard file included in the template is essential IMO. There's already a huge amount of knowledge required to get anything working in the mobile space and it's really important that all the features offered by the system work "out of the box". I agree that every developer that needs ProGuard will need to learn about it, but having the system help us as much as possible by providing expert-level defaults will make a big difference for those just starting out in the learning.
Anyone who's already an expert already has their own ProGuard file and won't care. But anyone who's learning will really appreciate something to get them started.

@Redth
Copy link
Member

Redth commented Jun 8, 2018

Yes, I didn't see this rule in particular in the proguard configs for support, so presumably Forms may need to ship their own proguard config file in their nuget package...

@Redth
Copy link
Member

Redth commented Jun 8, 2018

I think we need to do some more evaluation of other rules that might be needed here.

I also now have an app which needs:

-keep class android.support.v7.widget.FitWindowsLinearLayout { *; }

jonpryor pushed a commit to dotnet/android that referenced this issue Nov 7, 2018
Commit 4bb4b2e introduced a crash in our
`Xamarin.Forms-Performance-Integration` test, crashing in the middle
of app startup, because the r8 linker is enabled.

The same happens when ProGuard is enabled in Xamarin.Forms apps;
see also: xamarin/Xamarin.Forms#2709

It looks like we need to preserve the `android.support.v7.view.**`
classes to avoid the crash.

	E AndroidRuntime: FATAL EXCEPTION: main
	E AndroidRuntime: Process: Xamarin.Forms_Performance_Integration, PID: 8563
	E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{Xamarin.Forms_Performance_Integration/xamarin.forms.performance.integration.MainActivity}: android.view.InflateException: Binary XML file line #17: Binary XML file line #17: Error inflating class android.support.v7.view.menu.ActionMenuItemView
	E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
	E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
	E AndroidRuntime:        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
	E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
	E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
	E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
	E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:106)
	E AndroidRuntime:        at android.os.Looper.loop(Looper.java:193)
	E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6669)
	E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
	E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
	E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #17: Binary XML file line #17: Error inflating class android.support.v7.view.menu.ActionMenuItemView
	E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class android.support.v7.view.menu.ActionMenuItemView
	E AndroidRuntime: Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context, interface android.util.AttributeSet]
	E AndroidRuntime:        at java.lang.Class.getConstructor0(Class.java:2327)
	E AndroidRuntime:        at java.lang.Class.getConstructor(Class.java:1725)
	E AndroidRuntime:        at android.view.LayoutInflater.createView(LayoutInflater.java:615)
	E AndroidRuntime:        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
	E AndroidRuntime:        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
	E AndroidRuntime:        at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
	E AndroidRuntime:        at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
	E AndroidRuntime:        at android.support.v7.view.menu.BaseMenuPresenter.createItemView(:1)
	E AndroidRuntime:        at android.support.v7.view.menu.BaseMenuPresenter.getItemView(:3)
	E AndroidRuntime:        at android.support.v7.widget.ActionMenuPresenter.getItemView(:3)
	E AndroidRuntime:        at android.support.v7.widget.ActionMenuPresenter.flagActionItems(:21)
	E AndroidRuntime:        at android.support.v7.view.menu.MenuBuilder.flagActionItems(:6)
	E AndroidRuntime:        at android.support.v7.view.menu.BaseMenuPresenter.updateMenuView(:3)
	E AndroidRuntime:        at android.support.v7.widget.ActionMenuPresenter.updateMenuView(:1)
	E AndroidRuntime:        at android.support.v7.view.menu.MenuBuilder.dispatchPresenterUpdate(:6)
	E AndroidRuntime:        at android.support.v7.view.menu.MenuBuilder.onItemsChanged(:4)
	E AndroidRuntime:        at android.support.v7.view.menu.MenuBuilder.onItemActionRequestChanged(:2)
	E AndroidRuntime:        at android.support.v7.view.menu.MenuItemImpl.setShowAsAction(:3)
	E AndroidRuntime:        at xamarin.forms.performance.integration.MainActivity.n_onCreate(Native Method)
	E AndroidRuntime:        at xamarin.forms.performance.integration.MainActivity.onCreate(:1)
	E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:7136)
	E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:7127)
	E AndroidRuntime:        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
	E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
	E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
	E AndroidRuntime:        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
	E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
	E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
	E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
	E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:106)
	E AndroidRuntime:        at android.os.Looper.loop(Looper.java:193)
	E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6669)
	E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
	E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
	W ActivityManager:   Force finishing activity Xamarin.Forms_Performance_Integration/xamarin.forms.performance.integration.MainActivity
@cheles
Copy link

cheles commented Dec 18, 2018

Hi guys.

Actually I see this behavior in a blank XF app (default VS 15.9.4 template) deployed on emulator with ProGuard and Link: SDK Assemblies only.
This is the logcat:
12-18 17:12:21.802 3077 3077 I MonoDroid: UNHANDLED EXCEPTION: 12-18 17:12:21.964 3077 3077 I MonoDroid: Java.Lang.RuntimeException: Binary XML file line #20: Binary XML file line #20: Error inflating class android.support.v7.widget.FitWindowsFrameLayout ---> Java.Lang.RuntimeException: Binary XML file line #20: Error inflating class android.support.v7.widget.FitWindowsFrameLayout ---> Java.Lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.FitWindowsFrameLayout" on path: DexPathList[[zip file "/data/app/com.companyname-R8Maip0eLKGJkFwI7ZqUtg==/base.apk"],nativeLibraryDirectories=[/data/app/com.companyname-R8Maip0eLKGJkFwI7ZqUtg==/lib/x86_64, /data/app/com.companyname-R8Maip0eLKGJkFwI7ZqUtg==/base.apk!/lib/x86_64, /system/lib64, /vendor/lib64]] 12-18 17:12:21.964 3077 3077 I MonoDroid: --- End of inner exception stack trace --- 12-18 17:12:21.964 3077 3077 I MonoDroid: --- End of inner exception stack trace --- 12-18 17:12:21.964 3077 3077 I MonoDroid: at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00089] in <1374239fc6564015b08570b0b66995ce>:0 12-18 17:12:21.964 3077 3077 I MonoDroid: at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0005d] in <1374239fc6564015b08570b0b66995ce>:0 12-18 17:12:21.964 3077 3077 I MonoDroid: at Android.Support.V7.App.AppCompatActivity.SetSupportActionBar (Android.Support.V7.Widget.Toolbar toolbar) [0x00031] in <02acf274960143d983b3270fa5f92b47>:0 12-18 17:12:21.964 3077 3077 I MonoDroid: at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x00057] in <81626d5b2a054a23bc21d192df515fa9>:0 12-18 17:12:21.964 3077 3077 I MonoDroid: at ReleaseProguard.Droid.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x00014] in <2b9f7e6f3d97439ba9b4cc4240d6d4ed>:0 12-18 17:12:21.964 3077 3077 I MonoDroid: at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x00011] in <886ee91a2179403797462c70548e7908>:0 12-18 17:12:21.964 3077 3077 I MonoDroid: at (wrapper dynamic-method) System.Object.7(intptr,intptr,intptr) 12-18 17:12:21.964 3077 3077 I MonoDroid: --- End of managed Java.Lang.RuntimeException stack trace --- 12-18 17:12:21.964 3077 3077 I MonoDroid: android.view.InflateException: Binary XML file line #20: Binary XML file line #20: Error inflating class android.support.v7.widget.FitWindowsFrameLayout 12-18 17:12:21.964 3077 3077 I MonoDroid: Caused by: android.view.InflateException: Binary XML file line #20: Error inflating class android.support.v7.widget.FitWindowsFrameLayout 12-18 17:12:21.964 3077 3077 I MonoDroid: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.FitWindowsFrameLayout" on path: DexPathList[[zip file "/data/app/com.companyname-R8Maip0eLKGJkFwI7ZqUtg==/base.apk"],nativeLibraryDirectories=[/data/app/com.companyname-R8Maip0eLKGJkFwI7ZqUtg==/lib/x86_64, /data/app/com.companyname-R8Maip0eLKGJkFwI7ZqUtg==/base.apk!/lib/x86_64, /system/lib64, /vendor/lib64]] 12-18 17:12:21.964 3077 3077 I MonoDroid: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125) 12-18 17:12:21.964 3077 3077 I MonoDroid: at java.lang.ClassLoader.loadClass(ClassLoader.java:379) 12-18 17:12:21.964 3077 3077 I MonoDroid: at java.lang.ClassLoader.loadClass(ClassLoader.java:312) 12-18 17:12:21.964 3077 3077 I MonoDroid: at android.view.LayoutInflater.createView(LayoutInflater.java:606) 12-18 17:12:21.964 3077 3077 I MonoDroid: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.support.v7.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:628) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:518) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.support.v7.app.AppCompatDelegateImpl.initWindowDecorActionBar(AppCompatDelegateImpl.java:319) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.support.v7.app.AppCompatDelegateImpl.getSupportActionBar(AppCompatDelegateImpl.java:306) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.support.v7.app.AppCompatDelegateImpl.setSupportActionBar(AppCompatDelegateImpl.java:343) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.support.v7.app.AppCompatActivity.setSupportActionBar(AppCompatActivity.java:130) 12-18 17:12:21.965 3077 3077 I MonoDroid: at md590e795765c880ba17299ddbb881218e5.MainActivity.n_onCreate(Native Method) 12-18 17:12:21.965 3077 3077 I MonoDroid: at md590e795765c880ba17299ddbb881218e5.MainActivity.onCreate(MainActivity.java:29) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.app.Activity.performCreate(Activity.java:7009) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.app.Activity.performCreate(Activity.java:7000) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.app.ActivityThread.-wrap11(Unknown Source:0) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.os.Handler.dispatchMessage(Handler.java:106) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.os.Looper.loop(Looper.java:164) 12-18 17:12:21.965 3077 3077 I MonoDroid: at android.app.ActivityThread.main(ActivityThread.java:6494) 12-18 17:12:21.965 3077 3077 I MonoDroid: at java.lang.reflect.Method.invoke(Native Method) 12-18 17:12:21.965 3077 3077 I MonoDroid: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 12-18 17:12:21.965 3077 3077 I MonoDroid: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 12-18 17:12:21.965 3077 3077 I MonoDroid: 12-18 17:12:21.986 3077 3077 D AndroidRuntime: Shutting down VM 12-18 17:12:21.987 3077 3077 E AndroidRuntime: FATAL EXCEPTION: main 12-18 17:12:21.987 3077 3077 E AndroidRuntime: Process: com.companyname, PID: 3077 12-18 17:12:21.987 3077 3077 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.companyname/md590e795765c880ba17299ddbb881218e5.MainActivity}: android.view.InflateException: Binary XML file line #20: Binary XML file line #20: Error inflating class android.support.v7.widget.FitWindowsFrameLayout 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6494) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #20: Binary XML file line #20: Error inflating class android.support.v7.widget.FitWindowsFrameLayout 12-18 17:12:21.987 3077 3077 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #20: Error inflating class android.support.v7.widget.FitWindowsFrameLayout 12-18 17:12:21.987 3077 3077 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.FitWindowsFrameLayout" on path: DexPathList[[zip file "/data/app/com.companyname-R8Maip0eLKGJkFwI7ZqUtg==/base.apk"],nativeLibraryDirectories=[/data/app/com.companyname-R8Maip0eLKGJkFwI7ZqUtg==/lib/x86_64, /data/app/com.companyname-R8Maip0eLKGJkFwI7ZqUtg==/base.apk!/lib/x86_64, /system/lib64, /vendor/lib64]] 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:606) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:628) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:518) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImpl.initWindowDecorActionBar(AppCompatDelegateImpl.java:319) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImpl.getSupportActionBar(AppCompatDelegateImpl.java:306) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImpl.setSupportActionBar(AppCompatDelegateImpl.java:343) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.support.v7.app.AppCompatActivity.setSupportActionBar(AppCompatActivity.java:130) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at md590e795765c880ba17299ddbb881218e5.MainActivity.n_onCreate(Native Method) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at md590e795765c880ba17299ddbb881218e5.MainActivity.onCreate(MainActivity.java:29) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7009) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7000) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6494) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 12-18 17:12:21.987 3077 3077 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 12-18 17:12:22.011 1673 1684 W ActivityManager: Force finishing activity com.companyname/md590e795765c880ba17299ddbb881218e5.MainActivity 12-18 17:12:22.023 1673 1691 I ActivityManager: Showing crash dialog for package com.companyname u0 12-18 17:12:22.058 1400 1446 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 4665344 12-18 17:12:22.062 1673 3039 I zygote64: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0 12-18 17:12:22.062 1673 3039 I OpenGLRenderer: Initialized EGL, version 1.4 12-18 17:12:22.062 1673 3039 D OpenGLRenderer: Swap behavior 1 12-18 17:12:22.064 1673 3039 W OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... 12-18 17:12:22.064 1673 3039 D OpenGLRenderer: Swap behavior 0 12-18 17:12:22.072 1673 3039 D EGL_emulation: eglCreateContext: 0x7b30e5290ba0: maj 3 min 1 rcv 4 12-18 17:12:22.074 1400 1446 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 4665344 12-18 17:12:22.083 1400 1446 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 4665344 12-18 17:12:22.084 1673 3039 D EGL_emulation: eglMakeCurrent: 0x7b30e5290ba0: ver 3 1 (tinfo 0x7b30debc6580) 12-18 17:12:22.087 1673 3039 E eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 12-18 17:12:22.087 1673 3039 E eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 12-18 17:12:22.133 1673 3039 D EGL_emulation: eglMakeCurrent: 0x7b30e5290ba0: ver 3 1 (tinfo 0x7b30debc6580) 12-18 17:12:22.290 1673 1691 W Looper : Dispatch took 179ms on android.ui, h=Handler (android.view.Choreographer$FrameHandler) {76fbe21} cb=android.view.Choreographer$FrameDisplayEventReceiver@5083246 msg=0 12-18 17:12:22.517 1673 1690 W ActivityManager: Activity pause timeout for ActivityRecord{db17bef u0 com.companyname/md590e795765c880ba17299ddbb881218e5.MainActivity t6 f} 12-18 17:12:22.549 1673 1690 I WindowManager: Failed to capture screenshot of Token{22ec6fc ActivityRecord{db17bef u0 com.companyname/md590e795765c880ba17299ddbb881218e5.MainActivity t6 f}} appWin=Window{f7b8c3d u0 Splash Screen com.companyname EXITING} drawState=4 12-18 17:12:22.549 1817 2063 D EGL_emulation: eglMakeCurrent: 0x7b30e822b560: ver 3 1 (tinfo 0x7b30e87eb400) 12-18 17:12:22.563 1817 2063 D EGL_emulation: eglMakeCurrent: 0x7b30e822b560: ver 3 1 (tinfo 0x7b30e87eb400) 12-18 17:12:22.581 1400 1446 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 14749696 12-18 17:12:22.612 1400 1446 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 14749696 12-18 17:12:22.639 1400 1400 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 14749696 12-18 17:12:23.001 1415 2010 E IPCThreadState: binder thread pool (4 threads) starved for 358 ms 12-18 17:12:23.034 1673 1685 W zygote64: Long monitor contention with owner android.anim (1732) at void com.android.server.wm.WindowSurfacePlacer.lambda$-com_android_server_wm_WindowSurfacePlacer_5337()(WindowSurfacePlacer.java:107) waiters=0 in void com.android.server.wm.StackWindowController.getBounds(android.graphics.Rect) for 403ms 12-18 17:12:23.211 2282 2393 D EGL_emulation: eglMakeCurrent: 0x7b30f563d5a0: ver 3 1 (tinfo 0x7b30f560d640) 12-18 17:12:23.255 1673 1690 W zygote64: Long monitor contention with owner android.display (1697) at void com.android.server.am.ActivityRecord.onWindowsVisible()(ActivityRecord.java:1947) waiters=0 in void com.android.server.am.ActivityManagerService$MainHandler.handleMessage(android.os.Message) for 168ms 12-18 17:12:23.713 2282 2393 W OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer... 12-18 17:12:23.975 1673 1684 W ActivityManager: Force finishing activity com.companyname/md590e795765c880ba17299ddbb881218e5.MainActivity 12-18 17:12:23.979 1673 3039 D EGL_emulation: eglMakeCurrent: 0x7b30e5290ba0: ver 3 1 (tinfo 0x7b30debc6580) 12-18 17:12:23.979 1673 1684 I ActivityManager: Killing 3077:com.companyname/u0a60 (adj 900): crash 12-18 17:12:23.981 1673 1692 W zygote64: kill(-3077, 9) failed: No such process 12-18 17:12:24.024 1673 1692 W zygote64: kill(-3077, 9) failed: No such process 12-18 17:12:24.049 1673 1691 W InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed. 12-18 17:12:24.049 1673 1691 W ViewRootImpl[companyname]: Dropping event due to root view being removed: MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=715.4756, y[0]=877.625, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=537741, downTime=537696, deviceId=0, source=0x1002 } 12-18 17:12:24.049 1673 1691 W InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed. 12-18 17:12:24.068 1673 1692 W zygote64: kill(-3077, 9) failed: No such process 12-18 17:12:24.068 1673 1692 I zygote64: Successfully killed process cgroup uid 10060 pid 3077 in 88ms 12-18 17:12:24.263 1673 1732 W AppOps : Finishing op nesting under-run: uid 1000 pkg android code 24 time=0 duration=0 nesting=0 12-18 17:12:24.284 1817 2063 D EGL_emulation: eglMakeCurrent: 0x7b30e822b560: ver 3 1 (tinfo 0x7b30e87eb400) 12-18 17:12:24.441 1817 2063 I chatty : uid=10023(com.android.systemui) RenderThread identical 10 lines 12-18 17:12:24.454 1817 2063 D EGL_emulation: eglMakeCurrent: 0x7b30e822b560: ver 3 1 (tinfo 0x7b30e87eb400) 12-18 17:12:25.319 1673 2698 D WificondControl: Scan result ready event

App can be deployed and it works only if Link: none (pointless) or as @Redth mentioned add a manual ProGuard file and -keep class android.support.v7.widget.FitWindowsLinearLayout { *; }

@Redth you also mentioned here that 28.0.0 will fix. I've updated all NuGets but still same behavior. Or am I missing something?

@samhouts
Copy link
Member

samhouts commented May 3, 2019

closed by #5143

@samhouts samhouts closed this as completed May 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants