Comments (8)
Sounds like you need to update xamarin forms along with essentials.
from essentials.
No, this still occurs even with everything else updated.
The issue is this project has made 'Platform.init()' protected.
from essentials.
Make sure that you updated both Xamarin.Forms and Xamarin.Essentials on all of your projects, the shared project, iOS, Android and that all the versions align. I don't see any reason why this should break. It seems to work fine in the sample app.
from essentials.
Make sure that you updated both Xamarin.Forms and Xamarin.Essentials on all of your projects, the shared project, iOS, Android and that all the versions align. I don't see any reason why this should break. It seems to work fine in the sample app.
You mean the sample Android app MainActivity.cs that calls Platform.Init() that I expressly stated is now a protected method when updating to version 1.8.0 when all 1.7.x versions work fine?
from essentials.
Still public from what I can see. The sample project is still a separate project and is bound to the same rules as your application, so if it was protected, it shouldn't be able to call it just like you.
from essentials.
Yes, I realized I mispoke about the Init() method (really thought that was the issue when I made the bug report) .. seems it was picking up the System 'Platform' object incorrectly and then whining about it, after my upgrade to 1.8.0.
What 1.8.0 DOES seem to break is the where the 'Platform' object even is.
I took some screenshots through my process. When I changed to explicit namespacing for the call to Platform.Init just like the sample application does, the proper error is apparent - it's not finding 'Platform' any more under the 1.8.0 nuget package.
Removing the call to 'Platform.Init()' breaks the version tracking.
Maybe the sample project needs to be updated since obviously something is different now. Maybe another package needs to be installed but it's not apparent to me what it is.
from essentials.
But that's the thing. 1.8.0 did not bring any breaking change in that regard. You can also see in the sample that the MainActivity
hasn't been touched in 3 years. If there was a breaking change in this area, that would've needed an update as well, but it didn't.
I have the feeling that there might be some weird issue with different versions between projects for you or some caching of older versions. If you throw out the bin/obj folders for the projects and rebuild, does that help?
If you create a new project and add Essentials to that and try to do the same, does that produce the same result?
from essentials.
That's fair enough. I just don't understand it. I tried making a new Xamarin project and I was able to upgrade it to 1.8.0 and it kept working.
However, even removing all dependencies to make the nuget package list the exact same as my updated example app, my original app had this error. I had closed the project and cleared the bin/obj folders both times on both projects to see if there was any caching going on. I just cannot get it to work with 1.8.0 on my original app.
I do thank you for helping me work through this. It does appear that it's not a bug on this project so I'm going to close it off. I'll just stick with 1.7.7 and move on with life at this point! lol.
from essentials.
Related Issues (20)
- Error with Android Xamarin.Essentials 1.8.0 HOT 4
- Xamarin.Essentials 1.8.0 FilePicker gives NotImplementedInReferenceAssemblyException HOT 4
- [Bug] [Android] Android 14 MediaPicker shows modally over a blank view HOT 1
- support OpenHarmony HOT 1
- [Bug] WebAuthenticator with gogole auth 2.0 not returning back with the google auth 2.0 auth url
- [Bug] iOS 17+ Calendar Permissions not working when setting the first time HOT 9
- [Bug] Essentials connectivity - Android 14 Crash - java.lang.SecurityException:One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts(API level 34)[Bug] HOT 7
- [Bug] WebAuthenticator/Android - user case scenario when WebAuthenticator opens external Chrome and does not return to app HOT 3
- [Bug] UWP Media Picker capture Photo doesn't work on windows 11 HOT 7
- [Bug] [Bug] Xamarin Essentials connectivity - Android 14 Crash - java.lang.SecurityException:One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts(API level 34) HOT 1
- Values provided to `WebAuthenticatorResult` as an `Uri` are not properly url decoded
- The type or namespace 'Platform' does not exist on iOS HOT 4
- Can't compile Xamarin.Essentials while targeting Android SDK v34 HOT 1
- OrientationSensor on iOS does not work when Location Services are off. HOT 1
- Unable to Grant ScheduleExactAlarm permission.
- exceptions thrown?? HOT 2
- [Bug] `Connectivity.ConnectivityChanged` handler does not work when targeting API 34 on Android 14 phones / emulators. HOT 4
- [Bug] Native crash in xamarin.forms due to "Xamarin_Essentials_Xamarin_Essentials_Preferences_Get_string_System_DateTime_string"
- magnometro xamarin form HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from essentials.