Android builds twice when using flutter flavours - android

I recently upgraded Flutter from 2.2.x to 2.10.x.
All was working fine on 2.2.x. On the new version, iOS works properly, but Android is having issues, as it seems to be running the app build.gradle twice: a first time with the proper flavour, a second time with no flavour.
The command is flutter run --flavor dev
The error I get is:
Launching lib/main.dart on sdk gphone x86 arm in debug mode...
lib/main.dart:1
Reading env from: .env.dev
Starting a Gradle Daemon, 1 busy and 8 stopped Daemons could not be reused, use --status for details
> Configure project :app
Reading env from: .env
**************************
*** Missing .env file ****
**************************
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.6.2/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/guillaumeferron/Sites/TendoPay-App/android/app/build.gradle' line: 26
* What went wrong:
A problem occurred evaluating project ':app'.
> Cannot invoke method split() on null object
As you can see, there is a double "Reading env from", which should not happen. The first run works fine and goes through, but gets killed by the second run that fails.
The faulty line (which is not the issue itself, but a consequence of the dual run) is:
def flutterVersionCode = Double.parseDouble(project.env.get("APP_VERSION_ANDROID").split("\\.")[0]) * 10000 + Double.parseDouble(project.env.get("APP_VERSION_ANDROID").split("\\.")[1]) * 100 + Double.parseDouble(project.env.get("APP_VERSION_ANDROID").split("\\.")[2])
My flutter doctor is:
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.2.1 21D62 darwin-x64, locale en-CA)
• Flutter version 2.10.3 at /Users/guillaumeferron/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 7e9793dee1 (3 weeks ago), 2022-03-02 11:23:12 -0600
• Engine revision bd539267b4
• Dart version 2.16.1
• DevTools version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/guillaumeferron/Library/Android/sdk
• Platform android-31, build-tools 30.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.2.2)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 60.1.4
• Dart plugin version 212.5284.31
[✓] VS Code (version 1.65.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.36.0
[✓] Connected device (2 available)
• sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 99.0.4844.51
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
I've been looking around for a couple hours now, to no avail.
Flutter 2.10.x is not the problem itself, it is Android SDK 31 that is. Indeed, this only happens when I change the SDK version, unfortunately it is a required change in order to support the pub packages versions for 2.10.x.
If I println the different env variables I would get when having it as APP_VERSION_ANDROID="0.2.3" for instance, would be the first occurrence "0.2.3", and null the second, which triggers the error.
I have done all the flutter clean, flutter pub get, flutter pub upgrade, gradle clean, etc..
Any help would be appreciated, as I did not find anything relevant online, and lack the Android dev expertise to debug it myself.
Note: the flavour infrastructure I went for is https://medium.com/#animeshjain/build-flavors-in-flutter-android-and-ios-with-different-firebase-projects-per-flavor-27c5c5dac10b

For anyone stumbling upon this, after many hours of testing and research, what fixed it was to properly upgrade the Android version. So make sure that:
You open the project with Android Studio, and have all proper grade versions downloaded by going to File > Project Structure. Gradle should be v6.1.1 and Plugin v4.0.1
Set your kotlin version to v1.5.31 (https://docs.flutter.dev/release/breaking-changes/kotlin-version)
Have both your target and compile sdk version to 31
This should then work properly, and the gradle won't be executed a second time with no flavor.

Related

Flutter Android build not working in existing app on fresh Linux install

I have an existing flutter app (on GitHub here) that is working fine on my Windows 11 and MacOS machines, and was previously working on my Linux machine.
I installed a new distro a few days ago (OpenSUSE Tumbleweed) and now can't get the Android build to work. It fails with various errors depending on what stage of trying out different SDK version, etc., but the current error I'm on (after deleting everything and pulling it all down fresh) is:
Execution failed for task ':app:dependencies'.
> Could not resolve all dependencies for configuration ':app:androidApis'.
> Could not create task ':app:generateDebugLintModel'.
> java.lang.NullPointerException (no error message)
and also the below error a bit further down:
* Where:
Script '/home/jackv/bin/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 157
* What went wrong:
Execution failed for task ':tasks'.
> Could not create task ':generateLockfiles'.
> Process 'command '/home/jackv/Development/ComicWrap-F/android/gradlew'' finished with non-zero exit value 1
The weird thing is that creating a new project with flutter create --platform=android test_project results in a project that can build, but even if I go line by line and make sure all the build.gradle, .properties files, etc. are all the same it still doesn't work for my existing app.
I'm at a loss because the exact project files in the git repo were working totally fine on all platforms until I tried to start fresh on OpenSUSE.
My flutter doctor -v:
[✓] Flutter (Channel stable, 3.0.2, on openSUSE Tumbleweed 5.18.4-1-default, locale en_AU.UTF-8)
• Flutter version 3.0.2 at /home/jackv/bin/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision cd41fdd495 (10 days ago), 2022-06-08 09:52:13 -0700
• Engine revision f15f824b57
• Dart version 2.17.3
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /home/jackv/Android/Sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: /home/jackv/bin/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✗] Linux toolchain - develop for Linux desktop
✗ clang++ is required for Linux development.
It is likely available from your distribution (e.g.: apt install clang), or can be downloaded from https://releases.llvm.org/
✗ CMake is required for Linux development.
It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
✗ ninja is required for Linux development.
It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from https://github.com/ninja-build/ninja/releases
• pkg-config version 1.8.0
✗ GTK 3.0 development libraries are required for Linux development.
They are likely available from your distribution (e.g.: apt install libgtk-3-dev)
[✓] Android Studio (version 2021.2)
• Android Studio at /home/jackv/bin/android-studio
• Flutter plugin version 68.1.2
• Dart plugin version 212.5744
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] VS Code (version 1.68.1)
• VS Code at /usr/share/code
• Flutter extension version 3.42.0
[✓] Connected device (1 available)
• Linux (desktop) • linux • linux-x64 • openSUSE Tumbleweed 5.18.4-1-default
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 2 categories.
So turns out I didn't follow my own README, my local.properties file was missing the required adMob.appId entry.
I found the error by opening the AndroidManifest.xml project in Android Studio and looking at the errors in the "Merged" tab!

Unable to run Flutter project on Android after update

I've been trying to get my Flutter project to run after upgrading it to 2.10.4 and it's been a headache from the start. The project runs fine on a browser, but I'm having difficulty running on an Android emulator. I think I'm at the last hurdle, but I'm stumped right now. I'm receiving this error when running on VS Code:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to install the following SDK components:
build-tools;30.0.2 Android SDK Build-Tools 30.0.2
The SDK directory is not writable (C:\Program Files (x86)\Android\android-sdk)
Here's my Flutter Doctor:
PS D:\Documents\Flutter_Projects\glance> flutter doctor -v
[√] Flutter (Channel stable, 2.10.4, on Microsoft Windows [Version 10.0.19043.1586], locale en-US)
• Flutter version 2.10.4 at D:\Programs\flutter_windows_v1.2.1-stable\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c860cba910 (3 weeks ago), 2022-03-25 00:23:12 -0500
• Engine revision 57d3bac3dd
• Dart version 2.16.2
• DevTools version 2.9.2
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Program Files (x86)\Android\android-sdk
• Platform android-31, build-tools 30.0.3
• ANDROID_HOME = C:\Users\reff1\AppData\Local\Android\Sdk
• ANDROID_SDK_ROOT = C:\Users\reff1\AppData\Local\Android\Sdk
• Java binary at: D:\AndroidStudio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.1)
• Android Studio at D:\AndroidStudio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)
[!] Android Studio (version 4.1)
• Android Studio at D:\Programs\AndroidStudio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
X Unable to determine bundled Java version.
• Try updating or re-installing Android Studio.
[√] VS Code, 64-bit edition (version 1.50.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.17.0
[√] Connected device (4 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 12 (API 32) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19043.1586]
• Chrome (web) • chrome • web-javascript • Google Chrome 100.0.4896.88
• Edge (web) • edge • web-javascript • Microsoft Edge 99.0.1150.46
[√] HTTP Host Availability
• All required HTTP hosts are available
Here's the part that keeps getting me. I'm seeing I need to run flutter doctor --android-licenses and this is what I get:
PS D:\Documents\Flutter_Projects\glance> flutter doctor --android-licenses
Error: Could not find or load main class Files
I have no clue where to go from here. Any help would be greatly appreciated here. Thank you in advance.
It appears that you have two sets of Android Studio and Android SDK.
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Program Files (x86)\Android\android-sdk <--- 1
...
• ANDROID_HOME = C:\Users\reff1\AppData\Local\Android\Sdk <--- 2
[√] Android Studio (version 2021.1) <--- 1
• Android Studio at D:\AndroidStudio
...
[!] Android Studio (version 4.1) <--- 2
• Android Studio at D:\Programs\AndroidStudio
Android Studio version 4.1 is a bit older so I guess you installed it in the past and forgot about it.
Also, it is not normal (or up-to-date) to have Android SDK placed under Program Files.
This is the direct cause of the error. In Windows, writing files under Program Files requires administrator privileges.
Your system is possibly confused because you have a mixed environment with an SDK that requires administrator privileges and one that does not.
My advice is to first uninstall all of them.
Before you begin, find out where the Android Studio configuration files are stored and backup them.
It is documented in here.
Now, completely uninstall all versions of Android Studio and Android SDK, manually delete all environment variables related to Android if any, manually delete (and backup) all configuration files if the uninstaller did not, then make sure all four directories above are empty.
Next, install the latest version of Android Studio and install the Android SDK via Android Studio. At this point, make sure that the installation directory is not under Program Files or Program Files (x86). If it is, then something in the older version is still there and is doing bad things so you have to restart from the first step.
Finally, run flutter clean (just to be sure), then flutter doctor to make sure only one of each is detected.
In android studio update your sdk 30
Unable to determine bundled Java version.
• Try updating or re-installing Android Studio
See in your error in flutter doctor
Change the ownership of Android SDK:
sudo chown -R $(whoami) $ANDROID_HOME
For this issue : Android license status unknown.
Type in command prompt
flutter doctor --android-licenses
Type Yes/y/Y to accept licenses
Maybe it's an emulator specific issue, did you try to run it on a real device?
Regarding the android license issue you are getting, I guess that the system is not recognizing JAVA or it needs to be updated so please check that.
Also make sure that the emulator itself is updated and not only the android SDK, go to SDK manager and check all the dashed components:
If this didn't work, delete the emulator and create a new one, and if that didn't help, delete all instances of android studio as I see 2 on your system that might conflict the SDK path.

Error while trying to build flutter project

I am facing problems with the build of my apps(the old ones are working but all my new projects are receiving this message)
i already tried rebooting my pc and reinstalling flutter, but this doesn't change the error, and i can't find the solution anywhere
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
'D:\projects\CalendarProject' is not recognized as an internal or external command,
operable program or batch file.
Exception: Gradle task assembleDebug failed with exit code 1
this projects\CalendarProject is a old project, but every project i try to build i receive this message pointing to D:\projects\CalendarProject
also my flutter doctor seems perfectly fine
[√] Flutter (Channel stable, 1.20.4, on Microsoft Windows [Version 10.0.18363.1082], locale en-US)
• Flutter version 1.20.4 at C:\src\flutter
• Framework revision fba99f6cf9 (4 days ago), 2020-09-14 15:32:52 -0700
• Engine revision d1bc06f032
• Dart version 2.9.2
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at D:\android\AndroidVirtual
• Platform android-29, build-tools 29.0.3
• ANDROID_SDK_ROOT = D:\android\AndroidVirtual
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 44.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[!] IntelliJ IDEA Community Edition (version 2019.1)
• IntelliJ at C:\Users\Joâo Pedro\IntelliJ IDEA Community Edition 2019.1.3
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins
[√] VS Code (version 1.49.0)
• VS Code at C:\Users\Joâo Pedro\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.14.1
[√] Connected device (1 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
I think it is a config in android folder that is generating this error, but can't imagine what could it be
Are you using flutter in android studio? if so, try opening the project in "vs code", there seems to be a problem with flutter in android studio...
Solved:
the folder that i was using to create projects was inside a folder called "D:\projects\CalendarProject(V3)" (exemple:D:\projects\CalendarProject(V3)\flutter_app)
, don't know is it is a android sdk or flutter bug, but apperently one of them thought CalendarProject(V3) was a function and was trying to run it. this explains the message
'D:\projects\CalendarProject' is not recognized as an internal or external command,
operable program or batch file.
Fixed by changing the directory
you can recreate the error with:
>>mkdir teste(v3)
>>cd "teste(v3)"
>>flutter create app
>>cd app
>>flutter build apk

Failed to apply plugin [id 'com.android.internal.version-check']

I am experiencing issues building an android application on flutter. The IOS app complies with no problems.
The issue seems to be along the lines of Gradle versioning for the flutter's plugin. However, the plugin itself shouldn't be a problem because (I) I can import it in an empty project without issues, (II) if I remove it, then something else fails along the similar lines.
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/rsirokov/.pub-cache/hosted/pub.dartlang.org/devicelocale-0.3.1/android/build.gradle' line: 22
* What went wrong:
A problem occurred evaluating root project 'devicelocale'.
> Failed to apply plugin [id 'com.android.internal.version-check']
> Minimum supported Gradle version is 5.6.4. Current version is 5.6.2. If using the gradle wrapper, try editing the distributionUrl in /Users/rsirokov/.pub-cache/hosted/pub.dartlang.org/devicelocale-0.3.1/android/gradle/wrapper/gradle-wrapper.properties to gradle-5.6.4-all.zip
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
Exception: The plugin devicelocale could not be built due to the issue above.
Tried:
flutter pub cache repair;
flutter pub upgrade;
Different versions of Gradle for the main project;
Switched to Flutter stable channel of 1.17.4;
The aforementioned log proposes a solution to switch Gradle version in the plugin's project directory. However, I don't think this would be a good idea since this directory, .pub-cache, is handled automatically by package manager and any manual changes could only make it worse.
[✓] Flutter (Channel stable, v1.17.4, on Mac OS X 10.15.4 19E287, locale en-NO)
• Flutter version 1.17.4 at /Users/rsirokov/Projects/Plugins/flutter
• Framework revision 1ad9baa8b9 (3 weeks ago), 2020-06-17 14:41:16 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/rsirokov/Library/Android/sdk
• Platform android-30, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.5, Build version 11E608c
• CocoaPods version 1.9.3
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 47.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.3)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 39.0.3
• Dart plugin version 191.8423
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• No issues found!
The issue was indeed in the package, but not in the one Flutter was complaining about, not in devicelocale. The problem was in flutter_statusbar_manager. It is not natively migrated to AndroidX (and seems it won't be ever; the package is abandoned, so get rid of it if you're still using it). I actually saw in the logs automatic attempt to migrate it but didn't pay attention to it. It didn't throw any errors, so thought it was migrated successfully.
For more, I have a conversation in the flutter's repo HERE. The problem is that: (I) automatic AndroidX migration of the package by flutter has failed without throwing an error (?), (II) flutter provided misleading error saying that the problem is in the different package.

Device not applicable for the “main.dart” configuration

Before anyone points me to this link I would like to mention, that I don't think these are directly related.
As one can see my flutter doctor -v command is error free:
➜ flutter git:(stable) flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.3 19D76, locale en-US)
• Flutter version 1.12.13+hotfix.9 at /Users/johannes/.flutter-cli/flutter
• Framework revision f139b11009 (5 weeks ago), 2020-03-30 13:57:30 -0700
• Engine revision af51afceb8
• Dart version 2.7.2
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/johannes/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4.1, Build version 11E503a
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 45.1.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• No issues found!
Yet I to have the issue of a grayed out emulator device with the message Device not applicable for the “main.dart” configuration like this:
I can now only start the emulator using the dropdown menu <no device> like this:
Interestingly I am then actually able to run my app on the device, while the device is still grayed out:
Flutters hot-reloading feature seems to not work properly though.
I have already added the main folder to the project as suggested here and I also made sure to change NO SDK to ANDROID API PLATFORM as suggested in the same link. All dependencies in Project Structure > Modules are found by Android Studio. I cloned the Flutter SKD from the stable branch on GitHub.
Does anyone have an idea why my setup is behaving this way?
Close Android Studio and Run again as Administrator
It solved my problem:
1- Make sure Flutter plugin is installed in android studio, you can install the plugin from file > setting > plugin
2- choose flutter SDK path from File > setting> Language & Framework > flutter.
I have the same issue before.
Uninstall Flutter and Dart plugin from Android Studio then reinstall Flutter (Dart will be installed automatically)
Remove created emulators from AVD Manager and create new one
Try making new project, and set SDK version same as emulators API version or lower from File > Project Structure...
Hopefully worked for you.

Categories

Resources