Unable to locate sdkmanager.bat. Did you run Android Studio and install cmdline-tools after installing? - sdk

i was trying to make use of unreal engine 4 template for AR but i got this error. This step kinda connect android studio with unreal but i just don't work.

Ran into the same issue and fixed it by editing the SetupAndroid.bat file.
Example of adjusted code
Not sure why it doesnt set the location of the SDKManager after it fails the first one. But manually replacing the first location works.

if you encountered this issue when running "SetupAndroid.bat", the reason might be simple. If you check the "SetupAndroid.bat"(right click, edit. Or turn it into a txt), the default sdkmanager path might be different from the actual location.
You might need to search "sdkmanager" from the Android Studio SDK root folder manually(it suppose to display on the cmd interface), find the actual directory and correct the "SetupAndroid.bat", then try it again.

the same here, i tried to search "sdkmanager" at both of my Drive and couldn't find any.
couldn't find any cmdline-tools drive as well.

Try next:
Go to your AppData\Local\Android\Sdk folder
Search for sdkmanager.bat
Navigate to its location and copy it
Open SetupAndroid.bat with Notepad (or other editor of your choice)
Find the line(s) which contains sdkmanager.bat
Paste the copied location (for example \cmdline-tools\latest\bin\sdkmanager.bat)
Save, exit, and run the edited file
This worked for me.

I spent 2 hours to figure out what's wrong with it.
So, provided earlier solutions should fix it:
Simply just replace incorrect path to correct one or, just DELETE most outer IF block and first line where %SDKMANAGER% var first set to invalid (I suppose, outdated path) value.
This is a part of the source code of SetupAndroid.bat from Epic Games. I've checked version 4.27 and 5.1. These lines are kind of identical in both versions (however version 5.1 still has the same exact error, but it works due to changing the order of which path is tried first):
set SDKMANAGER=%STUDIO_SDK_PATH%\tools\bin\sdkmanager.bat
IF EXIST "%SDKMANAGER%" (
echo Using sdkmanager: %SDKMANAGER%
) ELSE (
set SDKMANAGER=%STUDIO_SDK_PATH%\cmdline-tools\latest\bin\sdkmanager.bat
IF EXIST "%SDKMANAGER%" (
echo Using sdkmanager: %SDKMANAGER%
) ELSE (
echo Unable to locate sdkmanager.bat. Did you run Android Studio and install cmdline-tools after installing?
pause
exit /b 1
)
)
And this specific part does not work! I don't know why those who developed that did not check it or they simply don't know how batch file variables work.
The thing here is that on recent Android SDK installations there's no folder tools at the path %STUDIO_SDK_PATH%. So the first condition check fails and then they try to overwrite variable value to correct one with path %STUDIO_SDK_PATH%\cmdline-tools\latest\bin. But this overwrite DOES NOT WORK. You can't just do that in a batch file (which is kind of stupid, but it is). More on that issue with batch vars here: How to overwrite an existing variable using another variable in batch files?
"Good" job! Epic Games

Related

How to remove error: the replacement path doesn't exist in XCode

I deleted an old project from my Mac, and now in my current project, which has no connections with the old I get a message:
error: the replacement path doesn't exist: "/path/to/old/project"
when I run on my ios device.
How it possible? These two projects never have any relations
How to fix it?
Ok, I made some investigation :)
First solution
First and lazy solution - you can turn off the "debug executable" option in your scheme:
screenshot of the first solution
Second solution
Actually, you can find some files under your ~/ directory, they are hidden, so you should use command + shift + . to see them:
screenshot of files
.lldbinit and (maybe a little different) .lldbinit-tulsiproj
in my case, I think, it was connected because a building of Telegram.app and little touch a Bazel thing https://bazel.build/
... so, just delete them both and you are happy with a clear debug console!

Not able to use FSI on VS code

since few days, I'm not able to use FSharp Interactive interpreter(Alt + Enter), it's giving me this message:
*Failed to spawn FSI, please ensure it's in PATH*
also, if I run the script, it give me connect ENONNREFUSED 127.0.0.1.8397
I'm using:
- Ubuntu 16.04
- Visual Studio Code 1.28.2
- Ionide-sharp 3.28.0
anyone have an idea to fix this?
Thanks in advance
I think the main cause is the last update done. I have made a rollback and now everything is back to normal:
remove ionide-fsharp from VS code
click on https://github.com/ionide/ionide-vscode-fsharp/releases/download/3.27.0/Ionide-fsharp-3.27.0.vsix to download previous version of ionide (v 3.27.0)
unzip the file. once the file is unziped, you will have 2 text files and a folder named extension. Rename that folder ionide.ionide-fsharp-3.27.0
on your terminal, type:
cd ~/.vscode
cd extensions/
mv /home/####/Downloads/Ionide-fsharp-3.27.0.vsix_FILES/ionide.ionide-fsharp-3.27.0 . (don't forget the dot at the end to move the folder to the new location )
it should add ionide.ionide-fsharp-3.27.0 into VS Code extensions
you need to turn off auto-update in VS Code (in VS Code, in the bottom left conner, click on Setting icon > click on Settings > in the field Search setting, type update and search, you should then search in the result for Extensions: Auto Update)
You can fix this just by installing .NET Core SDK from this link https://www.microsoft.com/net/learn/dotnet/hello-world-tutorial

where to find CMAKE_OSX_SYSROOT in IOS

i am trying to install opencv on my Mac IOS and there is this step of Adding an SDK path to CMAKE_OSX_SYSROOT, it will look something like this /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk.
and Add x86_64 to CMAKE_OSX_ARCHITECTURES, but don't know how to do it
I'm assuming you're already in the CMAKE application and you're following either one of these sets of directions.
Possible Instructions:
http://blogs.wcode.org/2014/10/howto-install-build-and-use-opencv-macosx-10-10/
http://outofbedlam.github.io/opencv/2015/07/15/Build-OpenCV-MacOSX/
Given which steps you isolated, I'm assuming you also know how to check and uncheck boxes in the CMAKE window. To enter text, you just right click in the empty space ("value" section) to the right of the variable of interest. When I came across this step, the thing which tripped me up was confirming the path/determining the right thing to enter in the window.* TLDR: it turned out to be almost the same thing (for me at least) "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk."
To find your path you need to navigate to that folder WITHIN THE TERMINAL! (Using Apple's Spotlight Search (command + space bar) or using finder windows just won't work. Because they don't see "inside" the Xcode application within the Applications folder. Assuming your home directory is't at the root, you need to keep entering cd .. until you get to the section that outputs the following:
>>>/ $ls -1
Applications
Library
Network
System
User Information
Users
Volumes
anaconda
...
Then you change directories ..., and see what's inside...
>>> $cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
>>> SDKs $ls
MacOSX10.11.sdk
Combine the path with whatever you find in your SDKs folder and you're done (see caveat below)!
Additional Caveat: Those instructions don't say explicitely, but at the end of the whole CMake process, you have to copy the ...opencv/SharedLibs/lib/cv2.so file to your directory of python packages: home/usr/.../lib/python2.7/dist-packages/cv2.so. Based on the advice found here, I installed the cv2.so file from the SharedLibs folder instead of the StaticLibs folder and it worked.
*I tried doing a spotlight serach for the "Developer" folder or "Xcode.app" and nothing was coming up! I thought that folder/path didn't exist and googling around for "CMAKE_OSX_SYSROOT" with "Python" or with "opencv" and a whole bunch of other things made me think the problem was every more of a jumbled mess and problematic.

Visual Studio cannot load project file -- thinks there's a "ghost" path

There's one weird project in my solution that doesn't want to load.
The error message that VS gives is:
The project file could not be loaded. Could not find file 'C:\Some Path\Project Name\Project Name\Project Name.csproj'.
Now, the actual path should be C:\Some Path\Project Name\Project Name.csproj.
Note how the last part of the path was duplicated. I can't figure out why VS insists on this.
Even weirder, the path that is shown in the properties window is correct. The path in the Solution file is correct.
I've removed all *.suo and *.user files in the project.
I've cleared caches, restarted VS (countless times), got the latest from TFS, pretty much every possible fix I can come up with. No change.
If I remove the project and try to re-add it, I get the same error. It hasn't always done this (started after a complex merge), but the current branch is getting the same issue on other teammate's computers, too.
What is causing this incorrect path and how do I fix it?

How to set compiler correctly in build.sh for building VLC in iOS

Whenever I tried to change CC and CPP in build.sh(ImportedSources/VLCKit/MobileVLCKit/ImportedSources/vlc/extras/package/ios)
This error comes
"Cannot pull with rebase: You have unstaged changes.
Please commit or stash them."
What is the right way to change CC and CPP path? I am trying to build VLC for iOS.
But "C compiler not working message" comes every time I build for device(for simulator it works fine). I found an answer from VLC forum that this might be due to xcrun points to wrong compiler (https://forum.videolan.org/viewtopic.php?f=36&t=117736).
But I can't change path in build.sh:( . Is there another way to deal with this error.
Where can I change the compiler path so that my C compiler works. I have searched a lot for this error, still no luck. Please provide some guidance.
Thanks,
Sibinesh M.C
Delete the existing and repull.
Next time just check that you are using zsh or iTerm2 (recommended by VLC). Also check the path expected by script file is same as yours. If not add by sudo.
I also faced the same issue, but setting the path by sudo does the job for me.

Resources