I have jenkins on ubuntu. Building worked fine until I started to use android ndk.
latest ndk is downloaded and extracted into /opt/android-sdk-linux/ndk-bundle
In /etc/profile.d/android.sh is:
export ANDROID_HOME="/opt/android-sdk-linux"
export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH"
export ANDROID_NDK_HOME="/opt/android-sdk-linux/ndk-bundle"
but I got still error:
:common:compileDebugNdk FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':common:compileDebugNdk'.
NDK not configured.
Download the NDK from http://developer.android.com/tools/sdk/ndk/. Then add ndk.dir=path/to/ndk in local.properties.
(On Windows, make sure you escape backslashes, e.g. C:\ndk rather than C:\ndk)
The message says it all. You should add a text file local.properties to the project directory on the Linux machine, with one line
ndk.dir=/opt/android-sdk-linux/ndk-bundle
This file is usually in .gitignore, and Android Studio generates it automatically. But when you build your project in Jenkins, it does not open Android Studio.
Related
I am new to electron and trying to build a windows installer for the electron app using my mac. I am using electron-packager to package the app and then electron-wix-msi to build the installer. When the build installer steps are executed, the error Unable to read file info from exe. Falling back to packaging description. Error: spawn Unknown system error -86 is thrown. please see the full error message in the attached screenshot.
I would like to highlight that when I build an installer for macOS, it works. Should I understand that I can not build a windows installer using mac?
build_installer64.ts file:
You can't do that, you have to do this on the Windows platform.
I use GitHub Actions to build my app for each platform, code for Windows:
https://code.korbsstudio.com/KorbsStudio/electron-builder-sample/-/blob/main/.github/workflows/build.yml#L52-71
Optionally, you can also use a Windows virtual machine and repeat the same process in there.
Update, for those interested in doing this on Linux, building a EXE setup file seems to be possible. You'll need to have wine installed and use:
npx electron-builder build --win
I am trying to install flutter and run the basic flutter example on visual studio code . I used flutter doctor in the command line and installed all the missing requirements , now i try to run a basic program in flutter ,but in visual studio code output i get the following error
[Running] dart "c:\fluttercode\mobile_test1\lib\main.dart"
'dart' is not recognized as an internal or external command,
operable program or batch file.
[Done] exited with code=1 in 64.965 seconds
I could find only one question similar to this in stack overflow ,
Visual Studio Code: dart not found
they told to change environment variables ,i added the environment variables (however the name of the environment variables was not mentioned in the answer )
I checked the dart site in case they mentioned it ,but i couldn't find anything related to the name of the environment variable
This is what i got from dart site
Windows:
In Windows, setting your PATH and environment variables can be done by opening Control Panel and typing “Environment” and then clicking the “Edit the system environment variables” option. You’ll be presented with a list of environment variables including PATH where you can edit or add new ones.
Note: You should reboot your computer after making changes to PATH to ensure all processes (including explorer) are updated.
So i just did a guess and added an environment variable with the name FLUTTER_ROOT(cause i remember reading somewhere in one of the settings in VS Code for dart ,this name was used) and pointed it to my flutter bin directory
I restarted my PC and opened vs code and changed in VS Settings >user settings>dart and flutter>Dart:Env and updated my path
{
"files.autoSave": "afterDelay",
"dart.flutterSdkPath": "C:\\src\\flutter\\bin"
}
But i get the same error
this is how my flutter bin folder looks like
Environment variables in PATH after installing Dart
You don't have to install the dart SDK if you already have the flutter SDK installed. When you specify the path of flutter, VSCode only recognizes the flutter commands and not the dart commands. What you should do is change the system environment variables (type env in the windows search bar) and add the dart sdk inside the PATH variable. The dart sdk is usually found inside /bin/cache/dart/bin. This worked for me, so give it a try
Try to add the flutter\bin sdk path and also the windows\system32 path to the user variables and/or system variables.
I had the same problem. Here is how I resolved it.
Download and extract dart sdk (I used the stable release)
https://v1-dartlang-org.firebaseapp.com/install/archive
add the dart sdk bin folder to your path
after you have added it to your path run
flutter pub global activate webdev
now i can run
webdev serve
without error.
I'm using windows so I used choco install dart-sdk -<version> to install dart through the powershell in admin mode. That got rid of my error
Installing flutter is not enough. You need to install the dart sdk.
Pre-req: Make sure you have Chocolatey installed on your machine.
Run "choco install dart-sdk" from an elevated prompt.
Restart vscode.
That did it for me.
I went to the dart website and searched for the dart sdk.
i then chose the option to install dart using setup wizard.
After running the executable file on my laptop it took some time to download all the files but once the setup was complete the error no longer occurred and i was able to run the code successfully.
Downloading dart setup from dart website
Installing using setup wizard
I want to create an IPA file for both the release and debug for my app created in xamarin. I created the release IPA file with the following command in Bamboo:
-v build -t:Build "-c:Release|iPhone" CustomerApp.sln
This can be replicated on the terminal too by doing this:
/path-to-/mdtool -v build -t:Build "-c:Release|iPhone" CustomerApp.sln
But when I try to use the "-c:Debug|iPhone" this will not create the ipa file, when trying to use the terminal or Bamboo. I then tried different configurations like "-c:Release|iPhoneSimulator", "-c:Debug|iPhoneSimulator", "-c:Ad Hoc|iPhone" and "-c:Debug|iPhoneSimulator" but all of these will not create the IPA file. Why is this?
I know that the path to mdtool and the solution are fine because it works for the Release IPA but is it to do with the configuration in either Xamarin or Xcode?
If you are on the same Mac as the one you are running Xamarin Studio, it should mimic the provisioning profile setup you have in the IDE. If the build in Xamarin Studio builds with that combination with no drop down change on the main project, I would expect the mdtool to work. Note that now in Visual Studio 2017 for Mac it will be vstool under the /Applications/Visual Studio.app folder.
My build line looks like this:
/Applications/Visual\ Studio.app/Contents/MacOS/vstool --verbose build --f --target:Build --configuration:"Debug|iPhone" --buildfile:my.sln > $BuildResults
Update January 2019, I have found very little guidance on the web about what exactly vstool can do and how to use it. I believe it to be the Microsoft version of the mdtool, which is part of the Monodevelop project at Github (mono/monodevelop). The mdtool source code is under monodevelop/main/src/tools folder. It appears to be a runner for a variety of tools available in the Monodevelop / Visual Studio installation. Running
/Applications/Visual\ Studio.app/Contents/MacOS/vstool -q
will list out the available tools. There is also a man page as part of the Monodevelop build process, at monodevelop/main/man which provides a bit more enlightenment. I was shown how to use the specific command by someone who was very familiar with the project.
We just converted our javascript files to typescript. Everything builds locally just fine but our build in TFS (cloud version i.e. tfs.visualstudio.com) gave us the error:
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\TypeScript\Microsoft.TypeScript.targets"
was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Locally we are using typescript version 0.9.1.1 and VS2012
And advise?
To ensure that Web projects using Microsoft.TypeScript.targets will build successfully on a build server, you have two options:
Install TypeScript on the build server
Copy the required files for Microsoft.TypeScript.targets to a different source-controlled folder and change the path references in
the csproj file to this folder.
More details here => http://typescript.codeplex.com/workitem/1518
Usually this is because you haven't installed the TypeScript extension on the build server - it will need the same installer you used locally.
This will put tsc.exe into the SDK/Typescript folder and allow the build server to build your TypeScript files and check all your types.
I had to install Visual Studio 2013 RC2 to get TypeScript installed by default and get rid of this error message, instead of trying to download a package.
It can be found here:
http://www.microsoft.com/fr-fr/download/details.aspx?id=42666
This message usually throws when you cancelled the installation of VS or changed the Typescript version or failed to install the Typescript SDK for the corresponding Visual Studio Edition. Download and install the Typescript SDK can get you rid of this error.
Here is the link for downloading SDK for VS2017.
https://www.microsoft.com/en-us/download/confirmation.aspx?id=55258
I installed cygwin, ant, android ndk and android sdk. I am following the instructions in slyvain's book "android ndk". I am trying to do the following step:
Create Ant build file and all related configuration files automatically using android
command (android.bat on Windows). These files describe how to compile and
package an Android application:
android update project –p .
I get a message that android: command not found.
not sure why this wasn't installed or, not in the path.
any suggestions?
It's in the $ANDROID_SDK_HOME\tools.
$ANDROID_SDK_HOME is the directory where you've installed Android SDK.
Also, remember to run SDK Manager first to fetch at least one Android build target.