Gradle sync fail in Android Studio 3.0.1 (latest version) even after downloading all Ndk/Sdk bundles - android-studio-3.0

I am new to Android Studio. How can I resolve this error?

Related

Build failed with error Remotebuild requires your projects to use cordova-ios 4.3.0 or greater with Xcode 8.3. Please update your cordova-ios version

I am aiming to deploy a mobile application to the iOS platform using codes developed in Visual Studio for an Android phone. I am unable to open the Visual Studio file on my Macbook (macOS High Sierra ver.10.13.6) as Visual Studio here does not seem to support .jsproj files. As such, I have attempted following the instructions in the link below to run a remotebuild on my mac while debugging codes and seeing an iOS simulator on my Windows computer.
https://learn.microsoft.com/en-us/visualstudio/cross-platform/tools-for-cordova/first-steps/ios-guide?view=toolsforcordova-2017#run-on-simulator
I was able to get the remotebuild running, however, I came across the error where it required my projects to use cordova-ios 4.3.0 or greater with Xcode 8.3. As my windows computer does not have Xcode, I turned to my macbook and tried updating and adding the Cordova iOS platform through the terminal, where it said "Current working directory is not a Cordova-based project." I have searched the error up and it said that it required my Visual Studio project to be open, which I am unable to do so as my file is not supported in the Mac version of Visual Studio.
The iOS version in my Windows Visual Studio is currently 4.2.0 and I am unsure how to get about updating it. I have seen the link below but in only applies to Macbook, where I cannot open the Visual Studio project file.
Install specific version of Cordova CLI in Visual Studio 2017
I have installed node.js as well as Git, also attempting to include/update the Cordova iOS platform through the command prompt (Once again unsure if that was the method, but I tried), however, the command prompt did not recognise the update to cordova. Under the toolset in Visual Studio, I have tried ticking on the checkbox under Cordova platforms to take the latest patch, where ~4.2.0 appears, but still does not update.
I am still new to coding and things seem very foreign to me, if I have missed out anything vital or am doing something fatally wrong, please do enlighten me.

Can't get Visual Studio to target the correct Android version

I have a problem getting Xamarin.Android to target the newest version of Android.
The problem arised when I tried installing the Xamarin.GooglePlayServices.Maps NuGet package, that required me to run at least Android 8.
From my Android SDK manager, I can see that Android 8 and 8.1 is the only SDK platforms installed:
However, when I start a new project in Visual Studio 2017, and go into the project properties, and extend the Compile using Android version dropdown, it's populated like this:
So here I can choose only 7.1 (that is marked as latest platform), and 8.0 and 8.1 is marked with (Requires installation). Android 7.1 SDK that VS uses is not even installed on my machine.
So the questions is: What do I have to do to select Android 8.1 as the Target Framework inside Visual Studio?
What do I have to do to select Android 8.1 as the Target Framework inside Visual Studio?
In your VS, Tools->Android->Android SDK Manager, you will see Android SDK for VS, it default path is C:\Program Files (x86)\Android\android-sdk.
In your AS, Android SDK's path is C:\Users\user name\AppData\Local\Android\Sdk
Now, you can change the VS's Android SDK's path to C:\Users\user name\AppData\Local\Android\Sdk, but we don't suggest you do that, it may cause VS compilation errors at some point, and by then you cannot find the cause of the problem.
So, you can download the Android 8 from VS again.

New Flutter Project wizard not showing on Android Studio 3.0.1

I installed Flutter following official document and also installed Flutter and Dart plugin on Android Studio.
But, I can't see File>New Flutter Project wizard on Android Studio 3.0.1
I run "flutter doctor" command. See the below output.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.1.5, on Mac OS X 10.13.3 17D102, locale en-TR)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
[✓] Android Studio (version 3.0)
[✓] IntelliJ IDEA Community Edition (version 2017.3.3)
[!] Connected devices
! No devices available
! Doctor found issues in 1 category.
You need check the “AndroidAPK Support” in your Plugins.
See this screenshot:
If you are sure to have both Dart and Flutter plugins correctly installed, check again your Plugins and be sure that Android APK Support is enabled.
If it isn't, enable it!
Et voilà! Now everything should be fine:
You can find the plugin menu inside the Welcome page
or, when you have a project opened, inside the Preferences menu:
Had the same problem. Check-in Android Studio if the Dart and Flutter plugins are both installed and marked with a lock symbol in Preferences --> Plugins.
Anyway, the following procedure helped me:
uninstall the Flutter plugin
restart Android Studio.
uninstall the Dart plugin
restart Android Studio again which seemed important to do
install the Dart plugin again
restart Android Studio although it is annoying
install the Flutter plugin again
and guess: restart Android Studio
After the last restart I saw the success message:
I assume we both installed both plugins without restarting after Dart.
I also faced it but soon I solved it
I simply install flutter and dart plugins and restarted Android Studio.
After restarting I noticed that there is no Wizard for creating flutter apps. But soon I realized that I have disabled some plugins ( Android Studio's default plugins ) so I enabled all plugins and restarted Android Studio again and BOOM! Now there is a wizard for Creating Flutter Apps.
Hope this helps you !
My answer will be nearly same with #VickyBOSS but I'll upload screenshots of before and after ;)
First and foremost Flutter and Dart plugins must be installed before.
After installing these plugins you can check if it is ok or not with flutter doctor
If you hadn't installed the plugins you would have this:
Android Studio
At first, I didn't see "Start a new Flutter project"
After:
I have also same problem.but what can you do in that situation is Just create the project with command line :
flutter create your_app_name
Now open android studio and open that project. Hope this works well
Yes first update all your plugins related to flutter and dart .
"AndroidAPK Support" plugin(install /enable /update).
3.This will work for all the AS , checked this on AS 3.4 also .
Thanks to the guys who answered before me .
I also ran into this issue and the steps above didn't work. What I did was check which plugins I have enabled and realized that Android APK Support and Android NDK Support was disabled in my AS. After enabling this and restarting android studio everything seems to be working correctly.
This worked for me. Install Dart and Flutter manually from Plugins:
Open Plugins (For Mac: Configure -> Plugins OR Android Studio -> Preferences -> Plugins)
Search for Dart -> Search in repositories -> Install -> Restart Android studio
Search for Flutter -> Search in repositories -> Install -> Restart Android Studio
Got the same problem, fixed it by installing dart first using the plugin manager of android studio. Then install flutter plugin.
How to set flutter wizard in Android Studio 3.0
File > Close Project
Configure > Check for Updates
You will find Flutter and Dart updates. Update and Restart. Downloading Patch.
File > New Flutter Project or Select new Flutter Project.
Hope your problem resolved.
Happy Codings!!
It was little different in my case. After upgrading to newest release of Android studio. The dart flutter and other related plugins were in incompatible mode.
You can check that by going to Android Studio=> Plugins.
I simply update those plugins and then restart the IDE and it works fine.
Just Restore your IDE settings as shown in image
File -> Manage Ide Settings -> Restore default settings
This will remove your installed plugins and ask you again to install them.
Update flutter using below command
flutter upgrade
and again create flutter application from android studio
For some reason, Flutter refused to show New Flutter Project in android studio 3.1
but when I use android studio 3.2 it works fine after installing Dart and flutter plugins.
Make sure you have flutter and dart installed, then enable Android apk support; this helped me
Uninstall Flutter and Dart plugin
Restart Android Studio
Install Flutter Plugin (it will prompt you to install Dart plugin as well. Accept it)
Restart Android Studio
Also, reminder to check whether the plugin is enabled or not. Go to Preferences -> Plugins -> Flutter/Dart. Although, it's enabled by default, you may have had to disable it at some point in the past. In that case, just enable it from Preferences -> Plugin -> Flutter/Dart if you want to.
In my case I did not have APK/NDK support Plugin, added that and it worked. Of course restart IDE couple of times.
Well go to command line and check flutter doctor , if all good give command to your project directory
flutter create appname
and import this to androidstudio , this will generate necessary plugins.
I've got the same problem and finally sorted out. It's usually caused by your upgrade of Android Studio from 2.x to 3.x at the same time.
In short, it's because Flutter is not correctly configurated, but behind the scene there might be different reasons, so the universal solution is to run flutter doctor -v to diagnose and see what's missing.
[First make sure you've already followed the setup steps in Flutter's official documentation and have your Android SDK updated.]
In my own case, a couple of things to fix:
Update the JAVA_HOME path in .bash_profile. Because I have 2 Java versions installed and so I updated it to use the same as Android Studio does. This is critical as flutter doctor relies on Java to check some of your configurations.
Some Android licenses not accepted - follow flutter doctor's advice to accept all licenses.
Android Studio's Flutter plugin version too low - simply update it.
Even if you have done everything here,it may not work if you have Android Studio 4.x or canary
It works only in lower version
In my case I only miss Dart plugin so i installed and on IDE restart it was there

Android Studio installation error in w7

This stuff is not downloading, can I manually download and add to Android studio?
https://dl.google.com/android/repository/android_m2repository_r47.zip
Error in Android Studio downloading and installation

Xamarin Studio 4.0.10 Android Project build fails with "Error initializing task PropertyGroup"

Using Xamarin Studio 4.0.10 on Mac OS/X 10.8.4 with latest updates from stable channel I am now getting the following error when trying to build a simple out of the box Android application project:
Error: Error initializing task PropertyGroup: Not registered task PropertyGroup. (BindableMap.Droid)
Anyone else getting this and if so were you able to solve it?
Thanks for any help!
You need to use Mono 3.2 (or later) since Xamarin.Android 4.8 uses a different compiler than the previous versions which requires Mono 3.2.

Resources