I'm testing with the Simulator and receive this error message. How do I select an appropriate (simulator) device?
At the top left of the Xcode window you have a combobox containing all your targets. Select the iOS one, and then the appropriate Simulator. You should check that your iOS target has a 'Deployment Target' equal or lower than the Simulator version.
You can manage your Targets clicking at your project in the project navigator (left panel). After selecting the target, the 'Deployment Target' is under the 'Summary' and 'Build Options' tabs.
Hope it helps.
Related
I have a brand new Samsung A10 with Pie on it.
I'm attempting to run the Sample Application provided in MediaPlugin:
https://github.com/jamesmontemagno/MediaPlugin
At first I was getting this error when I tried to build:
Invalid value 'armeabi' in $(AndroidSupportedAbis). This ABI is no
longer supported. Please update your project properties to remove the
old value. If the properties page does not show an 'armeabi' checkbox,
un-check and re-check one of the other ABIs and save the changes.
Then I did some reasearch and went to Android Properties / Android Options / Advanced and unselected armeabo-v7a.
As I understand it this will remove 32 but support, which I'm fine with.
Now I get this error:
ADB0020: Android ABI mismatch. You are deploying an app supporting
'x86;x86_64;arm64-v8a' ABIs to an incompatible device of ABI
'armeabi-v7a;armeabi'. You should either create an emulator matching
one of your app's ABIs or add 'armeabi-v7a' to the list of ABIs your
app builds for.
I'm targeting a new A10 Samsung phone with Android Pie on it. I can't see where to set the 'device ABI', though why would a new Pie phone be interseted in armeabi-v7a anyway?
Where can I set the 'device ABI' or otherwise fix this?
I can't find anything on Google. Thanks.
UPDATE
I've found this work around which is as worrying as it is bizarre:
Untick the armeabi-v7a option
Build
Re-tick the option
Build
Deploy
from
https://forums.xamarin.com/discussion/146174/vs2019-error-this-abi-is-no-longer-supported
I'd like to understand what's going on here rather than just work around it.
This is only an issue with my A10 physical Samsung phone, in emulators it seems to work fine.
I got this error before. You could untick all the supported architectures to tick all of them like below. Delete the obj and bin folder of project to clean and rebuild. Most of times, it works.
Different Android devices use different CPUs, which in turn support different instruction sets. Each combination of CPU and instruction set has its own Application Binary Interface (ABI).
For more support of Android ABIs, you could refer to the Android ABIs guides.
https://developer.android.com/ndk/guides/abis
To fix this issue on a Xamarin.Forms Android application, Right click on your android project and then select Properties > Android Options > Advanced.
You will see a dropdown for supported architectures. Select x84 & x86_64.
The app should now build and run on the emulator.
go to your project folder and edit yourproject.csproj
and remove starting <AndroidSupportedAbis> line completely.
add:
<AndroidSupportedAbis>armeabi-v7a;x86_64;arm64-v8a;x86</AndroidSupportedAbis>
save and debug. (changes accept on visual studio)
Enjoy.
Do not setup retry abis on xamarin.
I changed to Debug mode from Release mode after signing a release.
For Mac:
Android Project -> Option -> Android Build -> Advanced. Then tick all.
Click Option from Solution Explorer for Android:
Click Android Build then Advanced:
What is the correct way to stop this error?
For now I'm merely unchecking "Use Safe Area Layout Guides" which allows me to compile the app without error.
To resolve this issue you need to do next steps:
You need to click on your ViewController in your Interface Builder.
Then go to Attributes Inspector. And click there on "File Inspector".
Disable "Use Safe Area Layout Guides".
Apple told us in WWDC 2017 Session 412 that Safe Area Layout Guide is Backwards deployable. But it seems to be not supporting iOS 8.0. I've got the same error on Xcode 9 GM too.
In my case, I stopped using the Safe Area Layout Guide, but use Top Layout Guide and Bottom Layout Guide, even though they are deprecated on iOS 11.
In my case all deployment targets had to be raised from 8.0 to 9.0 :-[
In case you have to support 8.0 accepted answer works.
If you encounter this error with your CocoaPods, you must force your pods deployment target in podfile with minimum iOS 9.0, XCode 9 should manage this case but this is not working at the time of writing
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
Try closing and then reopening Xcode.
I believe it is imperative to support the latest iOS devices such as iPhone X, iPhone XS, and iPhone XR. The accepted answer to this question fails to address this. In Interface Builder, the Safe Area is a layout guide representing the portion of your view that is unobscured by bars and other content. In iOS 11+, Apple is deprecating the top and bottom layout guides and replacing them with this Safe Area Layout guide.
To resolve this Illegal Configuration Build error you should:
Update your project file to support a Deployment Target of iOS 9, not iOS 8.
Click on the 'Clean Build Folder' menu item off the Project menu.
Close xCode 10, and then restart it.
Rebuild your app.
Note that the 'Illegal Configuration' build error no longer appears, and you are now able to run your app in the simulator of your choice.
Environment: Version 8.2 beta (8C30a)
My schema list only devices.
How do I change the iOS version in simulator?
I can see the available iOS Simulators...
...but they're not listed in the schema list.
Nor is their a way to discriminate amongst the iOS versions within schema manager.
The list of available simulators is dictated by three factors:
It will not show you simulators whose iOS version is prior to that of your current app's deployment target. If you want to see some recent, prior iOS simulators, make sure your app's deployment target is set accordingly.
If you go to Xcode "Preferences" - "Components", you can confirm which iOS simulators are installed on your machine.
In Xcode's "Devices" window (shift+command+2), as shown in the snapshot in your original question, you can configure particular simulator devices for your Xcode environment.
Open your xcode and press command + shift + 2.
Click on left bottom + button and your new simulator with required iOS version.
Click create, now you are ready to use the new simulator.
After adding the #availability & #availability flags which allowed me to get a successful compiled under and older distribution target, I noticed that the iOSes came back:
Installed the Xcode 7 beta. Can't run any code because Xcode only seems to allow me to choose "iOS Device" destination and none of the sim devices I would normally expect. The project is set to iOS 9.0 target and Universal. And it's a basic, new project.
Here's what I tried:
Changing the target to iOS 8.0, then I see sim devices. But I want to run iOS 9.0
Xcode Menu > Preferences > Downloads > only see iOS 8.3, 8.2 downloadable... don't see mention of iOS 9.0
Xcode Menu > Open Developer Tools. See option for iOS Simulator and iOS Simulator (Watch). If I open iOS Simulator (not the watch), it opens up iOS Simulator 9.0 but running a watch
So looks like the iOS 9 simulator is installed but only for the watch. Odd.
Xcode Menu > Preferences > Locations > switched Command Line Tools to Xcode 7.0
OK found it... go to window > devices, hit "+" there and add an iOS 9.0 simulator. Weird... don't remember ever having to do this before (the simulators for all the iOS version / physical device types) just were there automatically.
if your project deployment target is set to above 9.0, then you won't be able to see the list of simulators. You need to change the Xcode project deployment target to 8.0.
Found Solution,
Go to ~/Library/Developer/CoreSimulator and delete "devices" folder, And restart Xcode, Now you can see all simulators.
I have recently downloaded the testScrollView and WalkCycle examples from https://github.com/C4Code, but the dropdown window in the topmost toolbar lacks the option to select iPad simulator as the target device. Do I have to have something enabled in order for this menu to display correctly, or is this an issue of incompatibility between C4/XCode versions?
I recently upgraded to iOS 6, so all the projects I build and put up online will be targeted for iOS 6.0 simulator.
Check the following link, the answer there will show you how to change your settings so that it builds for the iOS 5.1 simulator:
Xcode 4 - IOS - Simulator not available as build target