Flutter Finished With Error Please Review Your Gradle Project Setup in the Android/ Folder
This page tracks known issues with stable releases of Android Studio Bumblebee (2021.ane.1) and Android Gradle plugin 7.ane. If you experience an result not already included hither, please report a problems.
Upgrade to preview: Each release of Android Studio and the Android Gradle plugin aims to improve stability and performance, and add new features. To feel the benefits of upcoming releases now, download and install Android Studio Preview.
Known Bug with Android Studio
This section describes known issues that exist in the latest stable version of Android Studio.
Error when using different passwords for key and keystore
Starting with version iv.ii, Android Studio now runs on JDK eleven. This update causes an underlying behavior change related to signing keys.
When y'all navigate to Build > Generate Signed Bundle / APK and attempt to configure app signing for an app bundle or an APK, entering different passwords for the key and keystore may upshot in the following error:
Key was created with errors: Warning: Different shop and Central passwords not supported for PKCS12 Fundamental stores
To work around this outcome, enter the same password for both the key and keystore.
Android Studio doesn't beginning after installing version iv.2
Studio tries to import previous .vmoptions and sanitize them to work with the garbage collector used past JDK 11. If that process fails, the IDE may not outset for sure users who fix custom VM options in the .vmoptions file.
To work around this consequence, nosotros recommend commenting out custom options in .vmoptions (using the "#" graphic symbol). The .vmoptions file can be found in the post-obit locations:
Windows
C:\Users\YourUserName\AppData\[Local|Roaming]\Google\AndroidStudio4.ii\studio64.exe.vmoptions
macOS
~/Library/Awarding Support/Google/AndroidStudio4.ii/studio.vmoptions
Linux
~/.config/Google/AndroidStudio4.2/studio64.vmoptions
If Studio even so doesn't beginning after trying this workaround, come across Studio doesn't kickoff later on upgrade beneath.
Apps using Database Inspector crash on Android 11 emulator
Apps using the Database Inspector may crash when running on the Android eleven emulator, with an error like the following appearing in logcat:
Fatal signal 11 (SIGSEGV), code i (SEGV_MAPERR)
To gear up this issue, upgrade your Android xi emulator to version nine or higher by navigating to Tools > SDK Manager. In the SDK Platforms tab, bank check the box labeled Show Package Details and select revision ix or college of the Android eleven emulator.
Studio doesn't start after upgrade
If Studio doesn't offset after an upgrade, the problem may exist due to an invalid Android Studio configuration imported from a previous version of Android Studio or an incompatible plugin. As a workaround, effort deleting (or renaming, for backup purposes) the directory below, depending on the Android Studio version and operating system, and start Android Studio once again. This will reset Android Studio to its default state, with all third-political party plugins removed.
For Android Studio four.1 and later:
-
Windows:
%APPDATA%\Google\AndroidStudio<version>
Case:C:\Users\your_user_name\AppData\Roaming\Google\AndroidStudio4.1
-
macOS:
~/Library/Application Support/Google/AndroidStudio<version>
Example:~/Library/Awarding Support/Google/AndroidStudio4.1
-
Linux:
~/.config/Google/AndroidStudio<version>
and~/.local/share/Google/AndroidStudio<version>
Example:~/.config/Google/AndroidStudio4.1
and~/.local/share/Google/AndroidStudio4.1
For Android Studio 4.0 and earlier:
-
Windows:
%HOMEPATH%\.AndroidStudio<version>\config
Instance:C:\Users\your_user_name\.AndroidStudio3.6\config
-
macOS:
~/Library/Preferences/AndroidStudio<version>
Example:~/Library/Preferences/AndroidStudio3.6
-
Linux:
~/.AndroidStudio<version>/config
Instance:~/.AndroidStudio3.half-dozen/config
Note that the configuration directory for Canary and Beta releases of Android Studio is PreviewX.Y
instead of X.Y
for the <version>
. For example, Android Studio 4.1 Canary builds employ AndroidStudioPreview4.1
, instead of the AndroidStudio4.i
directory that is used for Release Candidates and Stable releases.
Compilation effect in Kotlin multiplatform projects
Compilation errors may arise in Kotlin MPP code due to missing symbols. Upgrading your Kotlin plugin to version 1.4 should resolve this issue.
Key mapping conflicts on Linux
On Linux, certain keyboard shortcuts disharmonize with default Linux keyboard shortcuts and those of popular window managers, such as KDE and GNOME. These conflicting keyboard shortcuts may not work as expected in Android Studio.
More information about this issue (including potential workarounds) can be found in IntelliJ's problems tracker.
Small UI text on Chrome Os
On Chrome OS, text might announced much smaller than in previous releases. To work effectually this result, practice the following:
- Open the Settings window past clicking File > Settings
- Navigate to Advent & Behavior > Advent.
- Select Utilize custom font.
- Increment the font size.
- In the Settings window, navigate to Editor > Font.
- Increment the font size.
- Click OK.
Code editing
This section describes known issues related to the lawmaking editor.
Frozen keyboard input - "iBus" problems on Linux
There are some known interactions between the iBus daemon on Linux and Android Studio. In some scenarios, the IDE stops responding to keyboard input or starts inputting random characters. This bug is triggered past some missing synchronization between iBus and XLib + AWT, and has already been reported upstream to JetBrains and iBus. There are iii current workarounds for this result:
- Workaround 1: Strength iBus into synchronous mode. Before starting Android Studio, run the following on the command line:
$ IBUS_ENABLE_SYNC_MODE=1 ibus-daemon -xrd
- Workaround 2: Disable iBus input in Android Studio. To disable iBus input for Android Studio just, run the following on the control line:
$ XMODIFIERS= ./bin/studio.sh
This workaround only disables input methods for Android Studio, non any other applications you may be running. Note that if you lot restart the daemon while Android Studio is running (for example, past runningibus-daemon -rd
), you effectively disable the input methods for all other applications and may also crash Android Studio'southward JVM with a sectionalization mistake. - Workaround three: Double-bank check the shortcut bindings to brand sure that the Side by side input shortcut is not set to Command+Space, since this is too the lawmaking completion shortcut in Android Studio. Ubuntu 14.04 (Trusty) makes Super+Space the default shortcut, but settings from previous versions may still be around. To check your shortcut bindings, run
ibus-setup
on the command line to open the IBus Preferences window. Nether Keyboard Shortcuts, check the Next input method. If it is set to Command+Space, change it to Super+Space, or another shortcut of your choice.
Project configuration
This section describes known issues related to projection configuration and Gradle sync.
Gradle Sync Failed: Broken Pipe
The issue is that the Gradle daemon is trying to apply IPv4 instead of IPv6.
- Workaround one: On Linux, put the following in your
~/.profile
or~/.bash_profile
:consign _JAVA_OPTIONS="-Djava.net.preferIPv6Addresses=truthful"
- Workaround two: in Android Studio's vmoptions file, change the line
-Djava.net.preferIPv4Addresses=true
to-Djava.net.preferIPv6Addresses=true
For more data, encounter the Networking IPv6 User Guide.
"peer not authenticated" errors from Gradle sync or SDK Manager
The root cause of these errors is a missing certificate in $JAVA_HOME/jre/lib/certificates/cacerts
. To resolve these errors, proceed as follows:
- If you're behind a proxy, attempt to connect straight. If the direct connectedness works, so in order to connect via the proxy y'all may need to use
keytool
to add together the proxy server'south certificate to the cacerts file. - Re-install a supported, unmodified JDK. At that place's a known issue affecting Ubuntu users, which results in an empty
/etc/ssl/certs/java/cacerts
. To work around this issue, execute the following on the command line:sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure
Deploying
This department describes known bug related to deploying your app to a continued device.
[Mac OS only] Incremental updates are non applied due to an issue with Gradle file watching on projects saved under /System/Volumes/Data
Gradle effect 18149 affects Android Gradle Plugin versions 7.0 and higher because they require Gradle version 7.0 and higher. Starting in Gradle 7.0, file watching is enabled past default. If y'all are working on Mac OS and your project is saved nether /Arrangement/Volumes/Data
, Gradle file watching will not properly track file changes. This will crusade the Build System to non see any file changes and it volition therefore not update the APK(s). The incremental deployment code will then exercise zero because the local APK country is the same as on the device.
To work effectually this issue you lot should motion your projection's directory to your user directory, that is, nether /Users/username
. The Build System will then be properly notified about file changes past Gradle file watching and incremental changes will exist successfully practical.
Android Emulator HAXM on macOS High Sierra
The Android Emulator on macOS High Sierra (10.13) requires HAXM 6.2.i+ for all-time compatibility and stability with macOS. Nonetheless, macOS x.13 has a more involved process to install kernel extensions such equally HAXM. You demand to manually let the kernel extension itself to be installed as follows:
- Commencement, endeavour to install the latest version of HAXM from the SDK Manager.
- In MacOS, go to System Preferences > Security and Privacy.
-
If you lot encounter an alert that System software from programmer "Intel Corporation Apps" was blocked from loading, click Let:
For more than information and workarounds, encounter this Apple webpage and issue 62395878.
Utilise Changes
This section describes known issues that are related to Apply Changes.
New app name not applied
If yous rename your app so try to employ that change, the updated name might not be reflected. To work around this issue, click Run to re-deploy your app and see your changes.
Issue in Android Runtime throws error
If you're using a device that runs Android 8.0 or 8.ane, you might encounter "VERIFICATION_ERROR" messages when trying to utilize sure types of changes (especially if you're using Kotlin). This message is caused by an result with the Android Runtime that is stock-still in Android 9.0 and higher. Although the effect causes Apply Changes to neglect, you can still Run your app again to see your changes. However, nosotros recommend that you upgrade the device to Android 9.0 or greater.
Debugging and testing
This section describes known issues related to debugging and testing your app.
JUnit tests missing resources in classpath when run from Android Studio
If you have specific resource folders in your Java modules, so those resource won't be found when running tests from the IDE. Running tests using Gradle from the control line will piece of work. Executing the Gradle bank check
job from the IDE will as well piece of work. Run across issue 64887 for more details.
This issue occurs because every bit of IntelliJ 13, which requires that you only accept a single folder as the classpath. IntelliJ'due south builder copies all resources into that build folder, but Gradle doesn't copy over the resources.
- Workaround ane: Run the Gradle
check
task from the IDE rather than running a unit test. - Workaround 2: Update your build script to manually copy resources into the build binder. See comment #13 for more information.
Running JUnit tests may compile the code twice
When creating a new project, the template JUnit configuration might exist created with two "Earlier launch" steps: Brand and Gradle-enlightened Make. This configuration is then propagated to all created JUnit run configurations.
- To fix the issue for the current projection, click Run > Edit Configurations and alter the default JUnit configuration to simply include the Gradle-aware Make step.
- To fix the issue for all future projects, click File > Shut Projection. You should see the welcome screen. Then click Configure > Project Defaults > Run Configurations and change the JUnit configuration to but include the Gradle-aware Make step.
Some examination run configurations don't work
Not all run configurations that are available when right-clicking a test method are valid. Specifically, the following configurations are non valid:
- Gradle run configurations (which have a Gradle logo every bit the icon) don't work.
- JUnit run configurations (which have an icon without the green Android) don't apply to instrumentation tests, which cannot exist run on the local JVM.
Android Studio also remembers the run configuration created in a given context (for instance, right-clicking a specific class or method), and volition not offer to run in a different configuration in the future. To ready this, click Run > Edit Configurations and remove the incorrectly-created configurations.
Adding Java breakpoints while debugging native code
While your app is paused at a breakpoint in your native lawmaking, the Automobile and Dual debuggers may non immediately recognize new Java breakpoints that y'all gear up. To avert this upshot, add together Java breakpoints either earlier starting a debug session or while the app is paused on a Java breakpoint. For more information, see result 229949.
Stepping out of the native debugger
While using the Machine or Dual debugger to debug Java and native code, if you pace into a native function from your Coffee lawmaking (for case, the debugger pauses execution at a line in your Java lawmaking that calls a native role and you click Step Into ) and you want to return to your Java code, click Resume Program
(instead of Step Out
or Step Over
). Your app process will all the same exist paused, and then click Resume Program
in the your-module-java tab to resume it. For more information, see issue 224385.
Native debugger hangs while loading libraries
While using the native debugger for the first time after upgrading to Android Studio 4.2 and college, the native debugger may end responding while loading libraries from the Android device. This effect is a sticky problem that continues to happen even if you finish and restart the debugger. To fix this problem, delete the LLDB enshroud at $USER/.lldb/module-cache/
.
Native debugger crashes with "Debugger process finished with exit code 127"
This error occurs on Linux-based platforms when starting the native debugger. It indicates that 1 of the libraries required by the native debugger is not installed on the local system. The name of the missing library may be already printed in the idea.log
file. If not, y'all tin can apply a final to navigate to the Android Studio installation directory and execute the bin/lldb/bin/LLDBFrontend --version
command line to learn which libraries are missing. Typically, the missing library is ncurses5
equally some contempo Linux distributions accept already upgraded to ncurses6
.
Profilers
This section describes known issues with the Profilers.
Native Memory Profiler: Profiling non available during app startup
The Native Memory Profiler is currently unavailable during app startup. This option will be available in an upcoming release.
As a workaround, y'all can use the Perfetto standalone command-line profiler to capture startup profiles.
Timeout errors in CPU Profiler
You may experience "Recording failed to stop" errors in the Android Studio CPU Profiler when y'all select the Sample Coffee Methods or Trace Java Methods configurations. These are often timeout errors, especially if you lot see the following error message in the idea.log
file:
Look for Fine art trace file timed out
The timeout errors tend to affect traced methods more than sampled methods and longer recordings more than than shorter recordings. Equally a temporary workaround, information technology may exist helpful to try shorter recordings to see if the error disappears.
If you experience timeout issues with the Profiler, please file a problems that includes the brand/model of your device(s) and any relevant entries from idea.log
and logcat.
ADB exception when debugging or profiling
When using Platform Tools 29.0.3, native debugging and the Android Studio Profilers might non work properly, and you might see either "AdbCommandRejectedException" or "Failed to connect port" in the thought.log
file when you select Assist > Show Log. Upgrading the Platform Tools to 29.0.4 or college fixes both issues.
To upgrade the Platform Tools, do the following:
- Open up the SDK Managing director from Android Studio past clicking Tools > SDK Manager or click SDK Manager
in the toolbar.
- Click the checkbox adjacent to Android SDK Platform-Tools and then it shows a checkmark. A download icon
should announced in the left cavalcade.
- Click Use or OK.
Plugin prevents Build Output window from working {:#cmake-highlighter)
Using the CMake simple highlighter plugin prevents content from appearing in the Build Output window. The build runs and the Build Output tab appears, only at that place is no output printed (issue #204791544).
Known issues with the Android Gradle Plugin
This section describes known issues that be in the latest stable version of the Android Gradle plugin.
Not all dynamic-characteristic library dependencies are lint checked
When running lint with checkDependencies = true
from an app module, dynamic-feature library dependencies aren't checked unless they're also app dependencies (event #191977888). As a workaround, the lint task tin exist run on those libraries.
Signing file named with carriage render characters
JAR signing (v1 scheme) does not back up file names containing carriage return characters (issue #63885809).
API changes
Android Gradle Plugin 3.0.0 and higher innovate API changes that remove certain functionalities and may intermission your existing builds. Later versions of the plugin may introduce new public APIs that supercede broken functionalities.
Modifying variant outputs at build fourth dimension may not work
Using the Variant API to manipulate variant outputs is broken with the new plugin. It however works for simple tasks, such every bit changing the APK proper name during build time, as shown below:
// If yous use each() to iterate through the variant objects, // you lot need to start using all(). That'southward considering each() iterates // through only the objects that already exist during configuration time— // simply those object don't exist at configuration time with the new model. // Still, all() adapts to the new model by picking up object as they are // added during execution. android.applicationVariants.all { variant -> variant.outputs.all { outputFileName = "${variant.name}-${variant.versionName}.apk" } }
However, more complicated tasks that involve accessing outputFile
objects no longer piece of work. That's because variant-specific tasks are no longer created during the configuration phase. This results in the plugin not knowing all of its outputs upward forepart, simply it also means faster configuration times.
manifestOutputFile is no longer available
The processManifest.manifestOutputFile()
method is no longer bachelor, and you get the following fault when yous call information technology:
A problem occurred configuring projection ':myapp'. Could not get unknown property 'manifestOutputFile' for task ':myapp:processDebugManifest' of type com.android.build.gradle.tasks.ProcessManifest.
Instead of calling manifestOutputFile()
to become the manifest file for each variant, yous can call processManifest.manifestOutputDirectory()
to render the path of the directory that contains all generated manifests. Y'all can then locate a manifest and apply your logic to information technology. The sample below dynamically changes the version code in the manifest:
android.applicationVariants.all { variant -> variant.outputs.all { output -> output.processManifest.doLast { // Stores the path to the maifest. String manifestPath = "$manifestOutputDirectory/AndroidManifest.xml" // Stores the contents of the manifest. def manifestContent = file(manifestPath).getText() // Changes the version code in the stored text. manifestContent = manifestContent.replace('android:versionCode="1"', String.format('android:versionCode="%s"', generatedCode)) // Overwrites the manifest with the new text. file(manifestPath).write(manifestContent) } } }
Fixed known issues
This section describes known bug that have been fixed in a contempo release. If you are experiencing any of these bug, yous should update Android Studio to the latest stable or preview version.
Fixed in Android Studio 2021.ane.1
- Missing lint output: At that place is no lint text output printed to
stdout
when the lint chore isUP-TO-Engagement
(issue #191897708). Fixed in AGP 7.1.0-alpha05. - Problems with unit testing an app project that uses the Hilt plugin: The unit exam classpath contains the non-instrumented app classes, which ways Hilt does not instrument the app classes to handle dependency injection when running unit of measurement tests (effect #213534628). Fixed in AGP vii.one.1.
Fixed in Android Studio 2020.3.1
- Lint exceptions in Kotlin projects: Kotlin projects that set
checkDependencies = truthful
may encounter null arrow exceptions or errors (issue #158777858).
Fixed in Android Studio 4.2
- IDE freezes on macOS Large Sur: Android Studio four.i might freeze when you open a dialog.
Fixed in Android Studio 4.1
- Restart to apply memory settings from previous version of IDE: Subsequently updating Android Studio, you demand to restart Android Studio to employ any retentiveness settings migrated from an earlier version of the IDE.
- Manifest course with custom permission strings is no longer generated by default: If you want to generate the class, fix
android.generateManifestClass = true
.
Fixed in Android Studio iii.6
-
APK installation error on LineageOS: Deploying your app to devices running certain versions of LineageOS or CyanogenMod might fail and throw an
INSTALL_PARSE_FAILED_NOT_APK
exception.On Android Studio 3.half dozen Beta 1 and higher, the IDE handles this exception by performing a full app install when you deploy your app to LineageOS or CyanogenMod devices, which might result in longer deploy times.
Fixed in Android Studio iii.5.two
- Broken XML code style: When editing XML code, the IDE applied an incorrect code style when you lot selected Code > Reformat Code from the menu bar.
Stock-still in Android Studio three.3.1
-
Out of memory errors when scanning C++-based projects: When Gradle scans a project that has C++ code in more than than one location on the same drive, the scan includes all directories below the starting time common directory. Scanning a large number of directories and files may lead to out of memory errors.
For more than information on this effect, read the bug associated with the upshot.
Source: https://developer.android.com/studio/known-issues
0 Response to "Flutter Finished With Error Please Review Your Gradle Project Setup in the Android/ Folder"
Postar um comentário