radimitrov / CSharpShellApp

77 stars 18 forks source link

[Fatal] [Bug] App won't open on Android 14 #361

Closed kzorin52 closed 5 months ago

kzorin52 commented 5 months ago

When I run it, it throws the following error and doesn't work:

Java.Lang.SecurityException: com.radinc.csharpshell.huawei: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
    at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualObjectMethod(JniObjectReference instance, JniObjectReference type, JniMethodInfo method, JniArgumentValue* args) 
    at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualObjectMethod(String encodedMember, IJavaPeerable self, JniArgumentValue* parameters) 
    at Android.Content.ContextWrapper.RegisterReceiver(BroadcastReceiver receiver, IntentFilter filter) 
    at Microsoft.Maui.Networking.ConnectivityImplementation.StartListeners() 
    at Microsoft.Maui.Networking.ConnectivityImplementation.add_ConnectivityChanged(EventHandler`1 value) 
    at Microsoft.Maui.Networking.Connectivity.add_ConnectivityChanged(EventHandler`1 value) 
    at CSharpShellCore.Activities.MainActivity.InitCode() 
    at CSharpShellCore.Activities.MainActivity+<<OnCreate>b__29_3>d.MoveNext() 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
    at System.Threading.Tasks.Task+<>c.<ThrowAsync>b__128_0(Object state) 
    at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0() 
    at Java.Lang.Thread+RunnableImplementor.Run() 
    at Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this) 
    at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz) 
kzorin52 commented 5 months ago

Btw i using version from Appgalery (I bought premium there)

kzorin52 commented 5 months ago

And when I try to open the project, it gives this:

System.NullReferenceException: Object reference not set to an instance of an object
    at CSharpShellCore.Activities.MainActivity+<InitProject>d__398.MoveNext() in C:\VS\CSharpShellCore\CSharpShellCore\Platforms\Android\Activities\MainActivity_code.cs:5858 [5858:5-5858:73]
    at CSharpShellCore.Activities.MainActivity+<LoadProject>d__397.MoveNext() in C:\VS\CSharpShellCore\CSharpShellCore\Platforms\Android\Activities\MainActivity_code.cs:5682 [5682:4-5682:50]
    at CSharpShellCore.Activities.MainActivity+<LoadCurrentProject>d__396.MoveNext() in C:\VS\CSharpShellCore\CSharpShellCore\Platforms\Android\Activities\MainActivity_code.cs:5534 [5534:4-5534:35]
    at CSharpShellCore.Activities.MainActivity+<CreateProject>d__420.MoveNext() in C:\VS\CSharpShellCore\CSharpShellCore\Platforms\Android\Activities\MainActivity_code.cs:7393 [7393:5-7393:32]
    at CSharpShellCore.Activities.MainActivity+<>c__DisplayClass417_0+<<CreateProjectDialog>b__3>d.MoveNext() in C:\VS\CSharpShellCore\CSharpShellCore\Platforms\Android\Activities\MainActivity_code.cs:7199 [7199:7-7199:203]

And this:

System.NullReferenceException: Object reference not set to an instance of an object
   at CSharpShellCore.Activities.MainActivity.InitProject(String projectFilePath, Boolean calledFromLoadProject)
   at CSharpShellCore.Activities.MainActivity.LoadProject(String filepath)
   at CSharpShellCore.Activities.MainActivity.LoadCurrentProject()
   at CSharpShellCore.Activities.MainActivity.LoadNewProject(String projPath, Boolean showLoadingToast)
   at CSharpShellCore.Activities.MainActivity.OpenFile()
radimitrov commented 5 months ago

The second error is because the app can't initialize properly because of the receiver bug. I just released the latest version which contains a fix. AppGallery should make it available within a few days.