I just got started with XAMARIN today.I have Visual Studio 2017 Community Edition v15.7.6.I downloaded XAMARIN from Visual Studio Installer :
I started VS,navigated to Tools>Options>Xamarin>Android Settings and made sure that JDK,Android SDK and NDK locations are correct.But whenever i create a new project(Template is : Android App(Xamarin)) and i open(or navigate to) Resources>Layout>activity_main.axml , the designer shows an error at the bottom saying :
The project contains resources that might not be affected,rendering might be affected
I have no clue why this is happening even after everything was installed properly.If i make any changes to the .axml file, the UI is not updated and when i try to debug the app(through emulator), all i get is a blank emulator screen.
I am totally new to Xamarin so please help me out by guiding me or pointing out where/what i missed ?
Related
Edit: I also forgot to mention that I tried running Visual Studio as administrator with all the templates up and I still got the same results
Edit2: I figured out that in another place I found the native cross-platform app that has an Main.axml for android
Other -> Blank Cross-Platform Mobile App (Native) -> In Layout: Mainaxml
but I can't open it (same problem from before) so I guess I'm missing the Android Designer, any way how to fix that? I can't find anything on google
Original:
First of all, I want to say that I spend 2 days searching the internet and I couldn't find any solutions, I really tried everything, and I have had many many problems with xamarin, here is what I have and what I tried
I'm using windows 7
I have visual studio 2017 enterprise
I downloaded xamarin through the visual studio installed
I am using google api 27, (and I have installed 27, 22, and 21)
I used haxm (as I have intel processor and windows 7 (so no hyper v for the emulator))
I don't have Android Emulator Manager, but I have Android Device Manager (which appears to be the same thing but I really tried fixing that and couldn't find any info anywhere)
When I want to start an app, I have to start the emulator manually, and then press "start without debugging" because I don't have the drop down for "debug target"
I tried using "open with" on the axml files to find "android designer" and I couldn't find it, I tried searching google a lot and still couldn't find anything
I verified that I have installed everything correctly
In the bottom are links I followed
Here is what I find when I open any of the following templates
Android -> Android App (Xamarin) -> Blank App -> In Layout: activity_main.axml
Android -> Android App (Xamarin) -> Single View App -> In Layout: activity_main.axml, content_main.axml
Android -> Android XAML App (Xamarin.Forms) -> In Layout: Tabbar.axml, Toolbar.axml
Cross-Platform -> Mobile App (Xamarin.Forms) -> Blank App (with all Platforms selected (Android, iOS, Windows (UWP)) and Code Sharing Strategy : .NET Standard) -> In Layout: Tabbar.axml, Toolbar.axml
But none of these axml files can be opened (visual studio freezes and then I have to close it from task manager (I even tried waiting up to an hour, I think in the bottom left it says "item does not support viewing" or something like that))
I would really be very very happy if anyone can help me
links I used:
https://learn.microsoft.com/en-us/xamarin/cross-platform/get-started/installation/windows
https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/windows
https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/android-sdk?ide=vs&tabs=vswin
https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/index
But none of these axml files can be opened --> visual studio freezes and then I have to close it from task manager
This is an issue of Visual Studio 15.7.3, Xamarin team is generating updated builds right now.
For now, here are some workaround:
If you need to open a .axml file in VS 15.7.3, you could change its extension name to .xml then open it.
Or:
Right-click the .axml file then use "open with" --> eg: choose XML Editor
Update:
Xamarin Team has been generated updated builds to resolve this issue and it only works for VS 15.7.3, for detailed information you could refer to:
https://github.com/xamarin/xamarin-android/issues/1777
Fixed:
Visual Studio 15.7.4 has been released and this issue is fixed:
https://learn.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes#15.7.4
https://developercommunity.visualstudio.com/content/problem/266846/axml-file-doesnt-open.html
I already done a OnsenUI project using notepad++ but i dont know how to compile into an android apk, after some research i found that i can use OnsenUI with Visual Studio. So i downloaded all extensions and components for getting start with OnsenUI in VS but now i need to know how to import my project in VS and compile into my new android app.
Already Added Existing Item but when i go test only open firefox and i cant compile it..
Any solutions?
Question2: When i start a new OnsenUI project BLANK and hit RUN/TEST button, im getting few errors, and all my extensions folders are set correctly.. Its because i cant run a BLANK project with doing nothing?
Thanks, sorry for my bad english
#edit
IMAGE: errors when try to build blank onsenui
Use Monaca CLI.
You can develop with Visual Studio Code (which is free, and separate from Visual Studio 2015)
You debug by running the Monaca Preview command (outside Visual Studio) and then every change is shown in the browser. (Best to use Chrome). Click on F12 for debugging. (You can set the chrome debugger to show as if its a phone and choose different layouts (for iphone or android). Your onsenUI will show correctly for each chosen phone.
To make an APK follow the monaca instructions. (You'll need a developer account on android and on IOS). See here: https://community.onsen.io/topic/557/build-apk-using-monaca-cli-or-cordova-cli
I create a project using Xamarin with VS2015, and everything was great.
I did update for both VS and Xamarin then when I open any *.axml layout file VS freezing then crashing.
I try many ways to solve this , repair VS , repair Xamarin , Update Android SDK , recreate the project them add the files again , disable Xaml designer and reset the settings of VS .
the problem sometimes goes , sometimes appears and now I am stuck with the solutions , please help.
I Solve this issue by:
1- deleting all the android virtual machines
2- not to put theme for the toolbar if the layout contains one and make theme global for all layouts.
3- install Xamarin components from nuget source.
4- do not install Android 6.0 N Preview.
5- Java jdk 1.7.0_71 is the most stable JDK with xamarin until now , so don't update java JDK.
some addition steps and recommendations :
6- make all your resources names are small case.
7- not to add '-' in any resource name.
lastly ..
Keep your Android SDK updated.
I am trying to add a text field (drag and drop) to an android layout through the layout designer, but I get the error in the image below, this happens in Xamarin studio.
If I try doing the same steps in Visual Studio 2012 and 2013, it crashes the visual studio!
any idea what is the problem?
This is a Java SE bug. You need to make sure you have valid Java Environment.
I would recommend, you uninstall Java kit and and reinstall it.
When you do that, make sure Xamarin Studio and Visual Studio are not open.
This actually is a known bug but it gets solved by updating/reinstalling Java Environment.
Also, if you have Xamarin Studio updates, you should install them as well.
Bugzilla
Recently i've started android training, and i've got the below 2 issues.
In my desktop i already had eclipse installed, and when trying to import the android plugins, I was getting some error, so what i did was downloaded eclipse+android package from android developers website and I copied it onto my programs files folder where java is installed and when i open it, it is throwing me an error saying the javaw is not found, goinf through the earlier posts on SO website, i've tried the below.
-vm
\adding the java path
But this didn't work for me. so what i did was installed the same package in my laptop(there is no another eclipse on my laptop). and it started working fine.
On my laptop in the eclipse+android package i write a program and when i hit the Android virtual device manager, it asks me to create a AVD, and when i've filled the entire data here, the OK button is still greyed out. Below is the screenshot.
Also i've tried to create by creating from Device definition,even here i'm not getting the ok button hoghlighted and below is its screenshot
please let me know how can i fix the above issues.
Thanks
Firstly you need not wonder for such a mess ..
For IDE purpose .. go to this link .. https://developer.android.com/sdk/installing/studio.html
Android Studio IDE contains all you need .. Just download ..extract and start creating your first Android project.
And now for tutorials to learn .. try these site ..
(1) https://buckysroom.org/videos.php?cat=6 ( Travis ... provide best tutorial in this world )
(2) https://developer.android.com/index.html
Now you are good to go ..
You can see it clearly says: "CPU/ABI: No system images installed for this target"
So either:
Lower your target.
Update your SDK.
Then set a CPU and you can go on in the AVD creation process.
update the sdk, install ARM/intel(x86) for CPU/ABI
Try using Android Studio by IntelliJ ,as it is for more better than eclipse and moreover ADT plugin for Eclipse is no longer in active development.
if you then also get the same error again try this link android Developer and setup java environment.