Javascript required
Skip to content Skip to sidebar Skip to footer

Error:failed to Load Project Configuration: Cannot Read File (No Such File or Directory)

This folio tracks known issues with stable releases of Android Studio Bumblebee (2021.ane.1) and Android Gradle plugin vii.1. If you experience an issue not already included here, please written report a bug.

Upgrade to preview: Each release of Android Studio and the Android Gradle plugin aims to improve stability and functioning, and add new features. To experience the benefits of upcoming releases now, download and install Android Studio Preview.

Known Bug with Android Studio

This department describes known problems that exist in the latest stable version of Android Studio.

Fault when using different passwords for fundamental and keystore

Starting with version 4.2, Android Studio at present runs on JDK 11. This update causes an underlying behavior modify related to signing keys.

When you navigate to Build > Generate Signed Package / APK and attempt to configure app signing for an app bundle or an APK, inbound different passwords for the key and keystore may result in the following error:

          Primal was created with errors: Warning: Different store and Key passwords not supported for PKCS12 Key stores                  

To work around this effect, enter the aforementioned password for both the key and keystore.

Android Studio doesn't start after installing version iv.2

Studio tries to import previous .vmoptions and sanitize them to work with the garbage collector used past JDK eleven. If that procedure fails, the IDE may not start for certain users who fix custom VM options in the .vmoptions file.

To piece of work effectually this upshot, nosotros recommend commenting out custom options in .vmoptions (using the "#" character). The .vmoptions file can be found in the following locations:

Windows

C:\Users\YourUserName\AppData\[Local|Roaming]\Google\AndroidStudio4.2\studio64.exe.vmoptions

macOS

~/Library/Awarding Back up/Google/AndroidStudio4.ii/studio.vmoptions

Linux

~/.config/Google/AndroidStudio4.ii/studio64.vmoptions

If Studio still doesn't start afterward trying this workaround, run across Studio doesn't start later upgrade below.

Apps using Database Inspector crash on Android 11 emulator

Apps using the Database Inspector may crash when running on the Android 11 emulator, with an error like the following appearing in logcat:

                      Fatal signal 11 (SIGSEGV), code i (SEGV_MAPERR)                  

To prepare this issue, upgrade your Android 11 emulator to version 9 or higher by navigating to Tools > SDK Manager. In the SDK Platforms tab, bank check the box labeled Show Package Details and select revision nine or higher of the Android 11 emulator.

Studio doesn't start afterwards upgrade

If Studio doesn't start after an upgrade, the problem may be due to an invalid Android Studio configuration imported from a previous version of Android Studio or an incompatible plugin. Every bit a workaround, try deleting (or renaming, for fill-in purposes) the directory beneath, depending on the Android Studio version and operating system, and starting time Android Studio again. This will reset Android Studio to its default country, with all tertiary-party plugins removed.

For Android Studio 4.ane and after:

  • Windows: %APPDATA%\Google\AndroidStudio<version>
    Example: C:\Users\your_user_name\AppData\Roaming\Google\AndroidStudio4.1

  • macOS: ~/Library/Awarding Support/Google/AndroidStudio<version>
    Example: ~/Library/Application 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.half dozen

  • Linux: ~/.AndroidStudio<version>/config
    Example: ~/.AndroidStudio3.6/config

Note that the configuration directory for Canary and Beta releases of Android Studio is PreviewX.Y instead of Ten.Y for the <version> . For case, Android Studio iv.1 Canary builds use AndroidStudioPreview4.ane, instead of the AndroidStudio4.1 directory that is used for Release Candidates and Stable releases.

Compilation consequence in Kotlin multiplatform projects

Compilation errors may arise in Kotlin MPP code due to missing symbols. Upgrading your Kotlin plugin to version i.4 should resolve this issue.

Central mapping conflicts on Linux

On Linux, certain keyboard shortcuts disharmonize with default Linux keyboard shortcuts and those of popular window managers, such every bit KDE and GNOME. These conflicting keyboard shortcuts may not piece of work as expected in Android Studio.

More data most this issue (including potential workarounds) can be institute in IntelliJ's bug tracker.

Pocket-size UI text on Chrome OS

On Chrome OS, text might announced much smaller than in previous releases. To work effectually this outcome, do the following:

  1. Open the Settings window past clicking File > Settings
  2. Navigate to Appearance & Behavior > Appearance.
  3. Select Use custom font.
  4. Increase the font size.
  5. In the Settings window, navigate to Editor > Font.
  6. Increase the font size.
  7. Click OK.

Code editing

This section describes known issues related to the lawmaking editor.

Frozen keyboard input - "iBus" bug on Linux

At that place are some known interactions betwixt the iBus daemon on Linux and Android Studio. In some scenarios, the IDE stops responding to keyboard input or starts inputting random characters. This issues is triggered by some missing synchronization between iBus and XLib + AWT, and has already been reported upstream to JetBrains and iBus. There are three current workarounds for this issue:

  • Workaround i: Strength iBus into synchronous mode. Before starting Android Studio, run the following on the command line:
    $ IBUS_ENABLE_SYNC_MODE=i ibus-daemon -xrd
  • Workaround 2: Disable iBus input in Android Studio. To disable iBus input for Android Studio only, run the following on the command line:
    $ XMODIFIERS= ./bin/studio.sh
    This workaround only disables input methods for Android Studio, non any other applications you may exist running. Annotation that if y'all restart the daemon while Android Studio is running (for example, by running ibus-daemon -rd), you finer disable the input methods for all other applications and may also crash Android Studio's JVM with a sectionalization fault.
  • Workaround 3: Double-cheque the shortcut bindings to make certain that the Next input shortcut is non set to Control+Space, since this is also the lawmaking completion shortcut in Android Studio. Ubuntu 14.04 (Trusty) makes Super+Infinite the default shortcut, but settings from previous versions may still be effectually. To cheque your shortcut bindings, run ibus-setup on the control line to open the IBus Preferences window. Under Keyboard Shortcuts, cheque the Next input method. If it is fix to Control+Infinite, change it to Super+Space, or another shortcut of your choice.

Project configuration

This section describes known issues related to project configuration and Gradle sync.

Gradle Sync Failed: Cleaved Pipage

The event is that the Gradle daemon is trying to use IPv4 instead of IPv6.

  • Workaround one: On Linux, put the following in your ~/.contour or ~/.bash_profile:
                  export _JAVA_OPTIONS="-Djava.net.preferIPv6Addresses=true"            
  • Workaround 2: in Android Studio's vmoptions file, alter the line -Djava.net.preferIPv4Addresses=truthful to -Djava.net.preferIPv6Addresses=true For more data, see the Networking IPv6 User Guide.

"peer non 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, go on as follows:

  • If you're behind a proxy, effort to connect directly. If the direct connection works, then in order to connect via the proxy yous may need to utilize keytool to add together the proxy server'south document to the cacerts file.
  • Re-install a supported, unmodified JDK. In that location'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 control line:
    sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure

Deploying

This section describes known issues related to deploying your app to a continued device.

[Mac OS just] Incremental updates are not practical due to an issue with Gradle file watching on projects saved under /Arrangement/Volumes/Data

Gradle outcome 18149 affects Android Gradle Plugin versions vii.0 and college considering they require Gradle version 7.0 and higher. Starting in Gradle seven.0, file watching is enabled by default. If you lot are working on Mac Bone and your projection is saved under /System/Volumes/Information, Gradle file watching volition not properly runway file changes. This will cause the Build System to not see whatever file changes and information technology volition therefore not update the APK(s). The incremental deployment lawmaking will then exercise nothing because the local APK state is the same equally on the device.

To work around this outcome you should move your projection's directory to your user directory, that is, under /Users/username. The Build Arrangement will then be properly notified virtually file changes past Gradle file watching and incremental changes will be successfully applied.

Android Emulator HAXM on macOS High Sierra

The Android Emulator on macOS High Sierra (x.13) requires HAXM vi.ii.1+ for best compatibility and stability with macOS. However, macOS 10.thirteen has a more involved process to install kernel extensions such as HAXM. You need to manually allow the kernel extension itself to be installed every bit follows:

  1. Outset, attempt to install the latest version of HAXM from the SDK Manager.
  2. In MacOS, go to Organisation Preferences > Security and Privacy.
  3. If you see an alarm that System software from developer "Intel Corporation Apps" was blocked from loading, click Allow:

For more information and workarounds, see this Apple webpage and issue 62395878.

Utilize Changes

This section describes known issues that are related to Utilize Changes.

New app name not applied

If you rename your app and then try to apply that change, the updated name might not be reflected. To work effectually this issue, click Run Run icon to re-deploy your app and encounter your changes.

Event in Android Runtime throws fault

If you lot're using a device that runs Android 8.0 or eight.one, you might encounter "VERIFICATION_ERROR" letters when trying to apply sure types of changes (especially if you're using Kotlin). This bulletin is caused by an consequence with the Android Runtime that is fixed in Android 9.0 and higher. Although the issue causes Apply Changes to neglect, you tin can nonetheless Run Run icon your app over again to see your changes. However, we recommend that yous upgrade the device to Android nine.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 lot have specific resource folders in your Java modules, then those resources won't be constitute when running tests from the IDE. Running tests using Gradle from the command line will piece of work. Executing the Gradle check task from the IDE volition besides piece of work. Run into issue 64887 for more than details.

This issue occurs because equally of IntelliJ 13, which requires that y'all simply have a single binder as the classpath. IntelliJ's builder copies all resources into that build binder, simply Gradle doesn't re-create over the resources.

  • Workaround 1: Run the Gradle check chore from the IDE rather than running a unit examination.
  • Workaround ii: Update your build script to manually re-create resources into the build folder. See comment #13 for more than 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: Make and Gradle-enlightened Make. This configuration is then propagated to all created JUnit run configurations.

  • To fix the event for the current project, click Run > Edit Configurations and change the default JUnit configuration to only include the Gradle-aware Brand pace.
  • To fix the upshot for all time to come projects, click File > Close Projection. Yous should come across the welcome screen. And so click Configure > Projection Defaults > Run Configurations and change the JUnit configuration to only include the Gradle-aware Make step.

Some test run configurations don't work

Not all run configurations that are available when correct-clicking a exam method are valid. Specifically, the following configurations are not valid:

  • Gradle run configurations (which have a Gradle logo as the icon) don't work.
  • JUnit run configurations (which have an icon without the green Android) don't utilise to instrumentation tests, which cannot be run on the local JVM.

Android Studio also remembers the run configuration created in a given context (for example, correct-clicking a specific class or method), and will not offer to run in a different configuration in the future. To set 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 code, the Car and Dual debuggers may not immediately recognize new Java breakpoints that you set. To avoid this upshot, add Coffee breakpoints either earlier starting a debug session or while the app is paused on a Coffee breakpoint. For more information, see issue 229949.

Stepping out of the native debugger

While using the Auto or Dual debugger to debug Java and native lawmaking, if you step into a native function from your Java lawmaking (for example, the debugger pauses execution at a line in your Java code that calls a native role and y'all click Step Into ) and you desire to return to your Java lawmaking, click Resume Programme (instead of Footstep Out or Footstep Over ). Your app process will all the same exist paused, and so click Resume Program in the your-module-java tab to resume it. For more data, see issue 224385.

Native debugger hangs while loading libraries

While using the native debugger for the offset time after upgrading to Android Studio 4.two and higher, the native debugger may stop responding while loading libraries from the Android device. This issue is a sticky trouble 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 leave lawmaking 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 exist already printed in the idea.log file. If not, yous tin can use a terminal 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 recent Linux distributions have already upgraded to ncurses6.

Profilers

This section describes known issues with the Profilers.

Native Memory Profiler: Profiling not bachelor during app startup

The Native Memory Profiler is currently unavailable during app startup. This choice volition be available in an upcoming release.

As a workaround, yous can employ 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 you lot select the Sample Java Methods or Trace Coffee Methods configurations. These are often timeout errors, peculiarly if you see the following error message in the idea.log file:

Wait for ART trace file timed out

The timeout errors tend to impact traced methods more sampled methods and longer recordings more than than shorter recordings. As a temporary workaround, it may be helpful to try shorter recordings to come across if the error disappears.

If you experience timeout issues with the Profiler, please file a bug that includes the make/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 not piece of work properly, and yous might meet either "AdbCommandRejectedException" or "Failed to connect port" in the idea.log file when yous select Help > Show Log. Upgrading the Platform Tools to 29.0.4 or higher fixes both problems.

To upgrade the Platform Tools, do the following:

  1. Open the SDK Manager from Android Studio by clicking Tools > SDK Managing director or click SDK Manager in the toolbar.
  2. Click the checkbox side by side to Android SDK Platform-Tools so it shows a checkmark. A download icon should announced in the left column.
  3. Click Utilise or OK.

Plugin prevents Build Output window from working {:#cmake-highlighter)

Using the CMake unproblematic highlighter plugin prevents content from actualization in the Build Output window. The build runs and the Build Output tab appears, but there is no output printed (issue #204791544).

Known issues with the Android Gradle Plugin

This section describes known bug that be in the latest stable version of the Android Gradle plugin.

Non all dynamic-feature 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 (consequence #191977888). Every bit a workaround, the lint task can exist run on those libraries.

Signing file named with carriage return characters

JAR signing (v1 scheme) does not support file names containing railroad vehicle return characters (issue #63885809).

API changes

Android Gradle Plugin 3.0.0 and higher introduce API changes that remove sure functionalities and may break your existing builds. Later versions of the plugin may introduce new public APIs that replace cleaved functionalities.

Modifying variant outputs at build time may non work

Using the Variant API to manipulate variant outputs is broken with the new plugin. Information technology still works for simple tasks, such as changing the APK name during build time, as shown below:

// If you use each() to iterate through the variant objects, // you lot need to showtime using all(). That'due south considering each() iterates // through only the objects that already exist during configuration time— // but those object don't be at configuration time with the new model. // However, 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.proper name}-${variant.versionName}.apk"     } }        

However, more complicated tasks that involve accessing outputFile objects no longer work. That's considering variant-specific tasks are no longer created during the configuration stage. This results in the plugin not knowing all of its outputs up front, but it likewise means faster configuration times.

manifestOutputFile is no longer available

The processManifest.manifestOutputFile() method is no longer available, and you get the post-obit error when you lot call it:

A problem occurred configuring project ':myapp'.    Could not go unknown property 'manifestOutputFile' for task    ':myapp:processDebugManifest' of type    com.android.build.gradle.tasks.ProcessManifest.        

Instead of calling manifestOutputFile() to get the manifest file for each variant, yous can call processManifest.manifestOutputDirectory() to return the path of the directory that contains all generated manifests. You tin can then locate a manifest and employ your logic to it. The sample below dynamically changes the version lawmaking 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.supersede('android:versionCode="i"',                     String.format('android:versionCode="%due south"', 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 recent release. If you are experiencing any of these issues, yous should update Android Studio to the latest stable or preview version.

Fixed in Android Studio 2021.1.1

  • Missing lint output: There is no lint text output printed to stdout when the lint chore is UP-TO-DATE (consequence #191897708). Fixed in AGP 7.1.0-alpha05.
  • Problems with unit of measurement testing an app project that uses the Hilt plugin: The unit test classpath contains the not-instrumented app classes, which means Hilt does not musical instrument the app classes to handle dependency injection when running unit tests (effect #213534628). Fixed in AGP 7.i.1.

Fixed in Android Studio 2020.3.1

  • Lint exceptions in Kotlin projects: Kotlin projects that prepare checkDependencies = truthful may run into null arrow exceptions or errors (issue #158777858).

Stock-still in Android Studio 4.2

  • IDE freezes on macOS Big Sur: Android Studio 4.1 might freeze when you open a dialog.

Fixed in Android Studio iv.1

  • Restart to apply memory settings from previous version of IDE: After updating Android Studio, you need to restart Android Studio to apply any memory settings migrated from an earlier version of the IDE.
  • Manifest course with custom permission strings is no longer generated past default: If y'all desire to generate the class, set up android.generateManifestClass = truthful.

Stock-still in Android Studio three.6

  • APK installation fault on LineageOS: Deploying your app to devices running sure versions of LineageOS or CyanogenMod might neglect and throw an INSTALL_PARSE_FAILED_NOT_APK exception.

    On Android Studio three.6 Beta i and college, the IDE handles this exception past 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 lawmaking style: When editing XML code, the IDE applied an incorrect lawmaking style when you selected Lawmaking > Reformat Lawmaking from the menu bar.

Fixed in Android Studio 3.iii.1

  • Out of memory errors when scanning C++-based projects: When Gradle scans a projection that has C++ code in more than one location on the aforementioned drive, the browse includes all directories below the first common directory. Scanning a large number of directories and files may lead to out of memory errors.

    For more information on this issue, read the problems associated with the issue.

morrisreckessequod1935.blogspot.com

Source: https://developer.android.com/studio/known-issues