I knew this was going to happen.. I broke my application use to work in Android now it does not. :(

AppDev01AppDev01 Member ✭✭✭
edited December 2018 in Xamarin.Forms

I was dreading this...

I worked all day today to get this application to run on an apple meaning getting the dev account info and getting the application to run via a connected Macintosh computer get a device registered and all the other apple hoops you have to jump through... and now my xamarin application for that worked great in Android will not compile...

I get the following errors now:

Severity Code Description Project Path File Line Source Suppression State
Error ADB0020: The package does not support the CPU architecture of this device.
at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) in E:\A_work\21\s\External\androidtools\Mono.AndroidTools\Internal\AdbOutputParsing.cs:line 337
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass95_0.b__0(Task1 t) in E:\A\_work\21\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 753 at System.Threading.Tasks.ContinuationTaskFromResultTask1.InnerInvoke()
at System.Threading.Tasks.Task.Execute() 0 Build

So now I cant get it to run on the Android emulator...

Let me ask you all what is the best practices here...

Should I Just creat two visual studio projects and have one setup for the apple and one set up for the Android...

I guess my only bet now is to pull and old version from source control...

THanks for any advice...sorry so many questions... but this experience with xamarin has been a horror show and I just want it to end.

Tagged:

Best Answer

  • AppDev01AppDev01 ✭✭✭
    Accepted Answer

    Many thanks!

    @ClintStLaurent said:

    i will never use xamerin ever again.

    Oh. Never mind. Well, you gave it a go and its not for you. That's reasonable. I was the same way with C++. It just didn't reach out and grab me. Yes I love CSharp. Go figure. I think its the difference in loving a Ram pickup or a Chevy. They are the same, only different - and somehow one just speaks to you and the other never feels comfortable for whatever reason you can't quite put your finger on.

    Best of luck in whatever direction you take from here.

Answers

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Go back to your back ups... your version control... look at the versions you checked-in/saved before doing the work.

    Should I Just creat two visual studio projects and have one setup for the apple and one set up for the Android...

    No. You should have only one solution, that contains multiple projects. One project is the agnostic/shared project. One is Android. One is iOS. One is UWP. None of the changes you made to the iOS project to get it running should have affected the Android project. They are different projects in the same solution.

    But... Since your droid project is now broken... You must have made changes outside of the iOS project. There's no real way for us to know or even guess what you did between points A and B. So go back in history in your source control to your last saved check-in/backup and start comparing one version to the next until you see what could have broken it.

  • Xami3Xami3 PKMember, University ✭✭✭
    edited December 2018

    if your iOS project works now, then you just need to revert the changes you have made to the android project. just copy the old file(s) say the csproj file from your last checkin and overwrite your latest csproj file with it.

    it is always a best practice to check the files before doing any Code checkin or push

  • AppDev01AppDev01 Member ✭✭✭

    Thanks all...maybe Im not understanding... the changes were made in the main project.... I thought xamerin took that prpject and funneled that to apple and the Android projects...

    I have aback up where android works...and I now have a version for apple that works... it will not be a big deal to manage both solutions I will just rename one android and one apple.

    that way I dont have to mess around with the configurations once they work...

    Thanks guys

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Sorry for how this sounds but...

    Clearly you don't understand how to set up your solution... nor do you seem to grasp how the different projects within a solution interact.

    If you want to keep different solutions for different OSes that's your business. And if you're just coding for yourself as a hobby its not a problem. But if you're learning Xamarin in the hopes of being employed for it some day then I would urge you to go back through the walk-throughs of creating Xamarin apps and learn how to set up your solutions correctly; because in the workplace you can't simply say "I can't figure it out so I'll do it the wrong way instead."

    Keep in mind though, one of the foundation concepts of using Xamarin is so you don't have to track multiple solutions. The point is to have 90%+ shared code and to be able to make a change in one place for multiple OSes. If you're not going to get that benefit you might as well just write native SWIFT for iOS, native JAVA for Android and so on so you at least get full native performance for your trouble.

  • AppDev01AppDev01 Member ✭✭✭

    Hi @ClintStLaurent

    yeah I do this as a job...

    i was giving xamarin a try and it has been difficult to setup up.. its been difficult to get the templates to work.. its been difficult to deploy... its been difficult to get basic stuff to work... its been difficult to get basics to work like stringformats for dates and times to work.. its been a total train wreck.

    the guides instruct you to do this.. do that and magic it works... the videos the dtuff on purals site..it all works there for them..but not for the standard user... Just do a search and you see all the workarounds and frustrations.

    after this project... i will never use xamerin ever again..its been the most frustrating experience I have ever had as a developer.

    Thank you for the guidance... i like working with tools that work as advertised... xamarin ain't one lol

    @ClintStLaurent said:
    Sorry for how this sounds but...

    Clearly you don't understand how to set up your solution... nor do you seem to grasp how the different projects within a solution interact.

    If you want to keep different solutions for different OSes that's your business. And if you're just coding for yourself as a hobby its not a problem. But if you're learning Xamarin in the hopes of being employed for it some day then I would urge you to go back through the walk-throughs of creating Xamarin apps and learn how to set up your solutions correctly; because in the workplace you can't simply say "I can't figure it out so I'll do it the wrong way instead."

    Keep in mind though, one of the foundation concepts of using Xamarin is so you don't have to track multiple solutions. The point is to have 90%+ shared code and to be able to make a change in one place for multiple OSes. If you're not going to get that benefit you might as well just write native SWIFT for iOS, native JAVA for Android and so on so you at least get full native performance for your trouble.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Well... If you like... You're welcome to go through my tutorial site. I try to make an effort to show it all real world along with explanations as to why we want to do something a given way in reality as opposed to the OEM walk-thru that has a very small and limited scope of intention.

    http://redpillxamarin.com/2018/03/12/2018-101-vs2017-new-solution/

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    i will never use xamerin ever again.

    Oh. Never mind. Well, you gave it a go and its not for you. That's reasonable. I was the same way with C++. It just didn't reach out and grab me. Yes I love CSharp. Go figure. I think its the difference in loving a Ram pickup or a Chevy. They are the same, only different - and somehow one just speaks to you and the other never feels comfortable for whatever reason you can't quite put your finger on.

    Best of luck in whatever direction you take from here.

  • AppDev01AppDev01 Member ✭✭✭
    Accepted Answer

    Many thanks!

    @ClintStLaurent said:

    i will never use xamerin ever again.

    Oh. Never mind. Well, you gave it a go and its not for you. That's reasonable. I was the same way with C++. It just didn't reach out and grab me. Yes I love CSharp. Go figure. I think its the difference in loving a Ram pickup or a Chevy. They are the same, only different - and somehow one just speaks to you and the other never feels comfortable for whatever reason you can't quite put your finger on.

    Best of luck in whatever direction you take from here.

Sign In or Register to comment.