Error Conflict with dependency in android studio - android-studio-3.0

I am getting this error in android studio when i try to create a new project. Please help me step to step to deal with it. I am completely new to this IDE. ERROR SCREENSHOT
Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.

I found the solution myself, I'd like to leave it here.
Open android studio.
On the left side that project menu (files explorer type)
there will be a option "gradle scripts" clicking on it opens the drop down menu.
There will be a file build.gradle (Module:app)
Double click it, It would open in android studio.
Change to the following in settings:
compileSdkVersion 27
targetSdkVersion 27
implementation 'com.android.support:appcompat-v7:27.1.1'
Sync the files in gradle. You're done.
Android studio would download the files if required.

Related

How to solve rzc generate exited code 1 error

When i pulled code from team explorer in visual studio code . Rzc generate exited code 1 error occured. I am unable to build project.how to solve this error?
Target framework .net core 3.1
Open the Project in visual studio-> check in views folder for any files having X - red color symbol then remove that file from visual studio.
Previously you deleted the files from folder - that is the issue.
ie, Razor Engine trying to render those files, but the engine could not find the physical location of that file, that is the problem. Always delete the unwanted files using the visual studio or any project editor. That is the best practice.
I solved rzc generate exited with code 1 microsoft.net.sdk.razor.codegeneration.targets
by undoing the changes that deleted a project from the folder in file explorer instead of visual studio.
In your Project.csproj, you should have a piece of XML code like this:
<ItemGroup>
<Folder Include="Controllers\" />
<Folder Include="Views\Home\" />
<Folder Include="Views\Shared\" />
</ItemGroup>
It depends on your folder structure.
In case you are using Windows 7 and getting the 'rzc generate exited with code -2147450750' while debugging a .NET Core app, try installing the standalone package: Microsoft Update Catalog - KB4457144.
I had the exact same error message (apart from the directories) on Windows 7 with a newer VC++ distribution already present.
The package contains the KB2533623 that we want. Details of KB4457144: September 11, 2018—KB4457144 (Monthly Rollup)
After installation and a reboot, dotnet new console goes through without an error.
Dell forum source: Microsoft Windows 7 Update KB2533623 needed to install Dell Update Package (DUP)
You are using visual studio 2019 older version then you have updated to the latest version has fixed my issue.
Yes. I have delete some files manually from folder.
So i resolved that issue by deleting the unloaded files from that deleted folder as
red cross files will be still in our visual studio if we delete
them outside.

Can't open or create projects: The type initializer for 'MonoDevelop.Projects.MSBuild.MSBuildEvaluationContext' threw an exception

This morning, I found I was unable to create or open any projects on Visual Studio Community for macOS v8.1.1 (build 27) without getting the error...
The project could not be created
The type initializer for 'MonoDevelop.Projects.MSBuild.MSBuildEvaluationContext' threw an exception.
This install of VS has been working for quite some time on this Mac. VS had found and installed some updates recently. This is not a box where I work routinely; it may have last worked successfully a week or so ago.
Here is a screencapture when trying to create a Console app project, for instance. The error occurs when I hit the "Create" button.
I've found a very similar error on a now defunct Bugzilla for the old Xamarin Studio here, which links me to this resolved GitHub issue on MonoDevelop, which is now Visual Studio, from 2017, which is marked Closed and Merged.
I've also found a very similar error report raised as another GitHub issue for MonoDevelop here. No clear resolution there; just a reply that, "Seems like MSBuild is not installed?"
They both suggest MSBuild isn't in the right place, but I'm not sure how I'd fix that.
I have tried uninstalling Visual Studio (by trashing) and removing .NET using sudo rm -rf /usr/local/share/dotnet. This removed .NET, but on reinstall of VS and .NET, the error returns.
Is there a better way to perform a clean install? Is there another way to resolve this issue?
Round 2
Since the issue was MonoDevelop specific, I did a find to find any file with mono in it. I found some stuff like this...
/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono
... in the Frameworks folder, and that looked promising. I've messed with MonoDevelop in the past (remember icsharpcode?), know that it used to be its own, independent, OSS C# IDE, and blasted that Mono.framework folder away.
sudo rm -rf /Library/Frameworks/Mono.framework/
I also deleted Visual Studio and removed /usr/local/share/dotnet again, then reinstalled .NET and VS with the VS installer.
When I tried to open Visual Studio, I got a different message.
Now we're getting somewhere. I clicked the "Download Mono Framework" button in that dialog and initially tried installing the "Visual Studio" release from the page the button opened, tried reopening VS, and got the same error as before. Strangely, the VS release is 5.18.1.3, and the error message, above, says I need 5.18.1.24+. :thinking-face:
I tried downloading the latest "Stable" release of the mono framework instead, which is version 5.20.1.19.
Visual Studio opens and creates new projects without error, but...
EDIT: That was short lived. I now get a /usr/local/share/dotnet/sdk/2.1.700/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(5,5): Error MSB4018: The "GenerateDepsFile" task failed unexpectedly.
System.TypeLoadException: Could not load type of field 'Microsoft.NET.Build.Tasks.DependencyContextBuilder:_filteredPackages' (12) due to: Could not resolve type with token 01000025 from typeref ...
error when I try to build the stock console app.
NOTE: There is an official process for deleting Mono I missed, and is better than the quick & dirty rm -rf I tried, above.

After Upgrading to Specflow3 and Deveroom Go To Definition not working for Steps in Feature

Here is my setup:
Specflow 3.0.191
Specflow.tools.MsBuild.Generation 3.0.191
Specflow.NUnit 3.0.191
Visual Studio 2019 Version 16
Deveroom Extension 1.1.1
When I am in a feature file in Visual Studio I am not able to go to the definition of any of my steps. I have tried F12 as well as right clicking on the step and choosing Go To Definition. Neither goes anywhere or pops any kind of error. There is a disconnect that doesn't prohibit the tests from running but does cause the Go To Definition not to work.
I have followed the configuration guide from the Specflow site (https://specflow.org/2019/updating-to-specflow-3/). My tests are running and working. I have deleted the specmap files from the %TEMP% directory and that didn't do anything. I uninstalled/reinstalled the deveroom Visual Studio plugin also which didn't work.
I welcome any insight.
Thanks,
J.R.
We are having the same issue with what I believe the root cause is the Visual Studio Extension version. According to the link you provided it should be supported by Specflow version 2.3.2 or higher, but we are still having issues with 2.4.1
A workaround for us was to uninstall the extension and then install the version appropriate .vsix file for the Visual Studio version below:
https://github.com/techtalk/SpecFlow.VisualStudio/releases/tag/v2017.2.7
And then remember to un-check automatic updates for this extension
I have been struggling with this for some time. I found that I had the following in my specflow.json config file:
{
"allowDebugGeneratedFiles": true
},
changing this to
{
"allowDebugGeneratedFiles": false
},
and rebuilding fixed the issue for me.

Beginner help: The system cannot find the path specified

I'm just starting to use Dart in Visual Studio code and having some problems.
I've gone into Visual Studio Code, gone to File-->Open Folder..then created a folder with another folder inside, and then selected it. Then I downloaded package-simple through the terminal.Then when I go to explorer, I see that there is already pre-made code..ie under lib, src, there is a simple_console_example.dart file.
When I try to run this file I get a bin/main.dart:1: Error: The system cannot find the path specified.
Any help is appreciated!
If you're running flutter extension in visual studio code for a sub-root directory, then debugging may yield the error whereas flutter run would work.
Solution is to open the sub-directory as folder in visual studio code.
If you're having this error for no apparent reason, try running commands below in the root directory of the project as suggested in this solution:
flutter clean & flutter run
Running
flutter clean & flutter run
from a terminal worked but it didn't fix the issue that I couldn't run a Debug session from within Visual Studio Code. The fix that did it for me was:
The solution is to delete .vscode folder inside your project
which I found here: Issue #29589 on Flutter Github Project
I have the same problem. find out that in my visual studio code at the explorer, i opened the wrong folder for my project. make sure your visual studio code is opening your folder project at the explorer nav bar on the left. File=>Open Folder=>"your project folder file.

xamarin.android - Resource.Designer errors after installing Android Studio

I installed Android Studio on the same PC as Xamarin. I wanted to use the same adb as Visual Studio in Android Studio.
(android-sdk path is an option on the initial install screen, but I had to use mklink to get around the fact that VS installs Android sdk at Program Files (x86) - Android Studio doesn't like non alphanumeric characters.
When I returned to Xamarin I could no longer compile, this seemed to be the main error:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1183,2): error MSB6006: "aapt.exe" exited with code -1073741819.
Luckily I kept a backup of this folder first, and reverting it did help
c:\Program Files (x86)\Android\android-sdk
Others might need to reinstall Xamarin after deleting / renaming android-sdk folder.
In addition to reverting this file I also had to clear the contents of
MyProject\MyProject.Droid\Resources\Resource.Designer.cs
This file isn't visible in VS, but you can get to it if there are errors to click on.
Don't forget to clean before build.

Resources