Cordova, building for android can not find gradle on Windows 10 - windows

Installed Cordova 10 through npm on Windows 10, and I have installed:
The correct Java JDK
Android Studio
In Android Studio => Settings menu, I have added SDK's for all the Android versions from 7 to 11 (API Level 24 to 30)
I have added environment variables to location of Android Studio in Path (... \Appdata\Local\Android\SDK)
I have added the ANDROID_SDK_ROOT and ANDROID_HOME environment variables to same location as above
I have downloaded gradle 6.7.1 and added D:\gradle-6.7.1 to both Path and GRADLE_HOME environment variable
Still(!) I can not manage to build a basic apk from Cordova sample build, getting the following message:
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=C:\Users\XXX\AppData\Local\Android\Sdk (recommended setting)
ANDROID_HOME=C:\Users\XXX\AppData\Local\Android\Sdk (DEPRECATED)
Using Android SDK: C:\Users\XXX\AppData\Local\Android\Sdk
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio

Had to add \bin to the gradle directory in Path environment variable, finally it works.

Related

ndk-bundle Not Found (GameMaker: Studio 2)

I downloaded the Android Studio and installed the ndk. GameMaker says no ndk was found. I tried to install the ndk separately but it didn't work either. What could it be?
Screenshot
Android Studio version 3.2.1
Sorry for my bad English
You will probably have to point to the specific NDK version directory such as C:\AndroidSDK\ndk\20.0.5594570\ instead of C:\AndroidSDK\ndk-bundle. Go to your C:\AndroidSDK\ndk-bundle directory and see which version of NDK you installed, and then post that directory to the IDE settings instead.

How to build release version of windows app?

How to build release version of windows app in flutter and where to find the build file ?
Actually I have build the windows app using flutter build windows but am not able to locate the file which could to installed to other desktops and could be used further on .
Flutter doctor output :-
H:\window app flutter\windowsapp>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 1.22.0-2.0.pre.36, on Microsoft Windows [Version 10.0.18363.1082], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.5)
[√] Android Studio (version 4.0)
[√] VS Code (version 1.50.0)
[√] Connected device (4 available)
• No issues found!
Please help 🙂
Flutter 2.10 arrives with stable support for building Windows app.
You can use flutter build windows and it will do the build for you.
Make sure to install Desktop development with C++.
The build .exe file can be found on ...\projectName\build\windows\runner\Release\
You can use msix package for build. To build using msix you need to enable developer mode on Windows.
Type start ms-settings:developers and it will open the setting and enable it.
Open Command prompt (as Administrator if you needed) and navigate to your project directory and type these command
flutter build windows
flutter pub run msix:create
You will get an .msix app that will install the usual way windows does.
You can also configuring your installer.
For more details go to https://flutter.dev/desktop
The executable can be found in your project under
build\windows\runner<build mode>. In addition to that executable,
you need the following:
From the same directory:
all the .dll files
the data directory
The Visual C++ redistributable
You can use any of the methods shown in the deployment example walkthroughs on the Microsoft site.
If you use the application-local option, you need to copy:
msvcp140.dll
vcruntime140.dll
vcruntime140_1.dll
Place the DLL files in a directory next to the executable and the other DLLs, and bundle them together in a zip file.
Yes!
So I found the release build in this folder after executing flutter build windows :-
windowsapp\build\windows\runner\Release
Here windowsapp is the main app directory
Note - For further distribution you'll need to zip the content present
inside the Release folder and distribute the same zipped file.

Ionic 2.3.2 [CordovaApp.Windows10.jsproj(61,5): error MSB4019]

When I run ionic build windows i get the below error
Building project: D:\app-Name\platforms\windows\CordovaApp.Windows10.jsproj
Configuration : debug
Platform : x64
D:\app-Name\platforms\windows\CordovaApp.Windows10.jsproj(61,5): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Microsoft.VisualStudio..Default.prop" was not found.
Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
My system info [ionic info]
Cordova CLI: 7.0.1
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.10.2
Xcode version: Not installed
I have installed Visual Studio community edition 2017 along with specific 2015 and 2017 build tools including the SDK.
Added the min target preferences in config.xml. Even after everything i'm unable to build it.
Please help me to resolve this issue.
It seems that Cordova looks for MSBuild tools version 14 of Visual Studio 2015.
These release notes suggest setting the environment variable MSBUILDDIR to the correct MSBuild directory installed on your system:
Install MSBuild tools 2015: https://www.microsoft.com/en-za/download/details.aspx?id=48159
Set environment variable MSBUILDDIR to C:\Program Files (x86)\MSBuild\14.0\Bin

How Fix this error java/lang/Object.class) : major version 52 is newer than 51, the highest major version supported by this compiler [duplicate]

This question already has answers here:
Warning major version 52 is newer than 51, the highest major version supported by this compiler
(11 answers)
Closed 6 years ago.
This error display when deploy soluation
This message display when start virtualbox and every once start virtual say problem in device and restart it
Check your JDK, and try to change it for 'latest' at -> Visual Studio -> Tools -> Options ->Xamarin -> Android Settings.
You will get this error when first upgrading to Android SDK build tools v24 if you are not targeting JDK 8. For notes and various workarounds see: https://releases.xamarin.com/technical-bulletin-android-sdk-build-tools-24/
I have pasted some workarounds from the above link for your convenience:
Update to Java JDK 8, and then make sure that JDK 8 is selected in the Xamarin preferences:
Visual Studio: Tools > Options > Xamarin > Android Settings > Java Development Kit Location.
Xamarin Studio (on Mac): Xamarin Studio > Preferences > Projects > SDK Locations > Android > Java SDK (JDK).
Uninstall all Android SDK Build-tools versions 24 and higher via the Android SDK manager.
Set the AndroidSdkBuildToolsVersion MSBuild property to an earlier version. For example, if you also have version 23.0.3 installed, you could add the following line within the top <PropertyGroup> element in the Android project .csproj file:
<AndroidSdkBuildToolsVersion>23.0.3</AndroidSdkBuildToolsVersion>

Error Copy android SDK folder from windows to mac?

What steps i followed:
Deleted SDK folder placed on MAC after installing Android Studio
Copy SDK folder from windows and pasted it on same location as previous SDK folder was placed .
Now Following Errors Keeps occurring:
When Rebuilding Project Gradle Build Error
When Clicking on StandAlone SDK manager Not found "my path" error=2 something something
When clicking on Run button exception adb not found occur
And many other issues
My Attempts in resolving issues:
1 - Installed All Gradle build latest and previous and tried to change my buildToolsVersion and support appcompat v7 on all of them finally one worked, build version 23.0.0 which is installed. (Hope Fully Resolved Gradle Build Error)
2 - Manually installed Tools folder for mac and replaced it with Tools folder in SDK folder
3 - Tried to Bribe my laptop and Android Studio , didn't work out though
Now why i did something like this? To save my bandwidth i have 78GB of SDK folder in windows and didn't want to waste my bandwidth installing all SDK's again , so Kindly suggest a workaround/solution

Resources