question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android: Setup Appbuilder being called multiple times

See original GitHub issue

The bug When the app isn’t entire closed, if we try open the app again, the Avalonia Activity OnCreate method is triggered again and causes the problem.

To Reproduce

  1. Start your application
  2. “Exit” pressing “Back” (That should keep the app running in background)
  3. Try return to your app without close it
  4. Throws this error:
System.InvalidOperationException: Setup was already called on one of AppBuilder instances
   at Avalonia.Controls.AppBuilderBase`1[[Avalonia.AppBuilder, Avalonia.PlatformSupport, Version=0.10.999.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b]].Setup() in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 302
   at Avalonia.Controls.AppBuilderBase`1[[Avalonia.AppBuilder, Avalonia.PlatformSupport, Version=0.10.999.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b]].SetupWithLifetime(IApplicationLifetime lifetime) in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 179
   at Avalonia.Android.AvaloniaActivity`1[[Sample.App, Sample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnCreate(Bundle savedInstanceState) in /_/src/Android/Avalonia.Android/AvaloniaActivity.cs:line 52
   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_(IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState)
   at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V(_JniMarshal_PPL_V callback, IntPtr jnienv, IntPtr klazz, IntPtr p0)
  • OS: Android 10
  • Version 0.10.15 + 0.10.999-cibuild0019213-beta

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
maxkatz6commented, Jun 12, 2022

@marcussacana I can reproduce it as well, so most likely not related to your phone

0reactions
marcussacanacommented, Oct 14, 2022

thx guys!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Application class method onCreate being called ...
onCreate is called more than once. Look into your manifest file and try to find the activity or service with something like android:process= ......
Read more >
Add or Remove Component in Your App | Fire App Builder
As desired, add one or more of the following components to your app. ... When removing a component, you remove the component name....
Read more >
Step 9: Configure Navigator | Fire App Builder
Because the Data Loader Recipe can load only one media feed URL at a time, if you have multiple media feed URLs, you...
Read more >
How to add Triggers
If the trigger is a programmatic In-app trigger, then the method must be called again after the "multiple times gap" timeframe is satisfied....
Read more >
Lightning App Builder
Lightning App Builder. Create more flexible Lightning record pages with Dynamic Forms, now available for select Salesforce objects. Filter by multiple picklist ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found