
React Native Build Issues Android For Mac
A framework for building native apps with React. Contribute to facebook/react-native development by creating an account on GitHub.
This page tracks known issues with Android Studio 3.6 and Android Gradle plugin3.6.0. If you experience an issue not already included here, please report abug.
Upgrade to preview: Each release of Android Studio and the Android Gradle plugin aims to improve stability and performance, and add new features. To experience the benefits of upcoming releases now, download and install Android Studio Preview.
Known Issues with Android Studio
This section describes known issues that exist in the latest stable version ofAndroid Studio.
Git version control errors in the IDE
Operations requiring authentication in Git version control are broken in theIDE for Android Studio 3.6.
To fix this issue, upgrade to Android Studio 3.6.1.
Key mapping conflicts on Linux
On Linux, certain keyboard shortcuts conflict with default Linux keyboardshortcuts 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 foundin IntelliJ's bug tracker.
Small UI text on Chrome OS
On Chrome OS, text might appear much smaller than in previous releases. To workaround this issue, do the following:
- Open the Settings window by clicking File > Settings
- Navigate to Appearance & Behavior > Appearance.
- Select Use custom font.
- Increase the font size.
- In the Settings window, navigate to Editor > Font.
- Increase the font size.
- Click OK.
Code editing
This section describes known issues related to the code editor.
Frozen keyboard input - 'iBus' problems on Linux
Video copilot twitch torrent. There are some knowninteractions between the iBus daemon on Linux and Android Studio. In somescenarios, the IDE stops responding to keyboard input or starts inputtingrandom characters. This bug is triggered by some missing synchronizationbetween iBus and XLib + AWT, and has already been reported upstream toJetBrainsand iBus. There arethree current workarounds for this issue:
- Workaround 1: Force iBus into synchronous mode. Before starting AndroidStudio, run the following on the command line:
- Workaround 2: Disable iBus input in Android Studio. To disable iBus inputfor Android Studio only, run the following on the command line:This workaround only disables input methods for Android Studio, notany other applications you may be running. Note that if you restart thedaemon while Android Studio is running (for example, by running
ibus-daemon -rd
), you effectively disable the input methods for allother applications and may also crash Android Studio's JVM with asegmentation fault. - Workaround 3: Double-check the shortcut bindings to make sure that theNext input shortcut is not set to Control+Space, since this is alsothe code completion shortcut in Android Studio. Ubuntu 14.04 (Trusty)makes Super+Space the default shortcut, but settings from previousversions may still be around. To check your shortcut bindings, run
ibus-setup
on the command line to open the IBus Preferences window.Under Keyboard Shortcuts, check the Next input method. If it isset to Control+Space, change it to Super+Space, or another shortcut ofyour choice.
Project configuration
This section describes known issues related to project configuration and Gradlesync.
Gradle Sync Failed: Broken Pipe
The issue is that the Gradle daemon is trying to use IPv4 instead of IPv6.
- Workaround 1: On Linux, put the following in your
~/.profile
or~/.bash_profile
: - Workaround 2: in Android Studio's vmoptionsfile,change the line
-Djava.net.preferIPv6Addresses=true
to-Djava.net.preferIPv6Addresses=true
For more information, see theNetworking IPv6 UserGuide.
'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, proceedas follows:
- If you're behind a proxy, try to connect directly. If the directconnection works, then in order to connect via the proxy you may need touse
keytool
to add the proxy server's certificate to the cacerts file. - Re-install a supported, unmodified JDK. There's aknown issueaffecting Ubuntu users, which results in an empty
/etc/ssl/certs/java/cacerts
. To work around this issue, execute thefollowing on the command line:
Deploying
This section describes known issues related to deploying your app to a connecteddevice.
Android Emulator HAXM on macOS High Sierra
The Android Emulator onmacOS High Sierra (10.13) requires HAXM 6.2.1+ for bestcompatibility and stability with macOS. However, macOS 10.13 has a moreinvolved process to install kernel extensions such as HAXM. You needto manually allow the kernel extension itself to be installed as follows:
- First, attempt to install the latest version of HAXM from theSDK Manager.
- In MacOS, go to System Preferences > Security and Privacy.
If you see an alert that System software from developer 'Intel CorporationApps' was blocked from loading, click Allow:
For more information and workarounds, seethis Apple webpage and issue 62395878.
Apply Changes
This section describes known issues that are related to Apply Changes.
Issue in Android Runtime throws error
If you're using a device that runs Android 8.0 or 8.1, you might encounter'VERIFICATION_ERROR' messages when trying to apply certain types of changes(especially if you're using Kotlin). This message is caused by an issue with theAndroid Runtime that is fixed in Android 9.0 and higher. Although the issuecauses Apply Changes to fail, you can still Runyour app again to see your changes. However, we recommend that you upgrade thedevice to Android 9.0 or greater.
Cannot apply changes when using android:sharedUserId
If you try to make changes to a class that hasn't yet been deployed to yourrunning app, Apply Changes will fail if your app is configured in either of thefollowing ways:
- Your app shares data with another app using a shared
android:sharedUserId
. - Your app runs in the same process as another app using a shared
android:sharedUserId
andandroid:process
.
When Apply Changes fails due to this issue, Android Studio displays thefollowing message:
To work around this issue in Android Studio 3.5, click Runto re-deploy your app and see your changes.
Note: This issue(#135172147) is fixed inAndroid Studio 3.6 Canary 6 and higher. If you have Android Studio set toreceive updates on the Canary or Dev channel, you can get the latest version bychoosing Help > Check for Updates (Android Studio > Check for Updates onmacOS). Otherwise, you can download it from the Android Studio preview page.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, then thoseresources won't be found when running tests from the IDE. Running testsusing Gradle from the command line will work. Executing the Gradle check
task from the IDE will also work. See issue64887 for moredetails.
This issue occurs because as of IntelliJ 13, which requires that you only havea single folder as the classpath. IntelliJ's builder copies all resourcesinto that build folder, but Gradle doesn't copy over the resources.
- Workaround 1: Run the Gradle
check
task from the IDE rather thanrunning a unit test. - Workaround 2: Update your build script to manually copy resources intothe build folder. Seecomment #13for more information.
Running JUnit tests may compile the code twice
When creating a new project, the template JUnit configuration might be createdwith two 'Before launch' steps: Make and Gradle-aware Make. This configurationis then propagated to all created JUnit run configurations.
- To fix the issue for the current project, click Run > EditConfigurations and change the default JUnit configuration to onlyinclude the Gradle-aware Make step.
- To fix the issue for all future projects, click File > CloseProject. You should see the welcome screen. Then click Configure >Project Defaults > Run Configurations and change the JUnitconfiguration to only include the Gradle-aware Make step.
Some test run configurations don't work
Not all run configurations thatare available when right-clicking a test method are valid. Specifically, thefollowing 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 apply to instrumentation tests, which cannot be run on the local JVM.
Adding Java breakpoints while debugging native code
While your app is paused at a breakpoint in your nativecode, the Auto and Dual debuggers may not immediately recognizenew Java breakpoints that you set. To avoid this issue, add Java breakpointseither before starting a debug session or while the app is paused on a Javabreakpoint. For more information, see issue229949.
Stepping out of the native debugger
While using the Auto or Dual debugger todebug Java and native code, if you step into a native function fromyour Java code (for example, the debugger pauses execution at a line in yourJava code that calls a native function and you click Step Into) and you want to return to your Java code, clickResume Program (instead of Step Out or Step Over ). Your app process will still be paused, so click ResumeProgram in the your-module-javatab to resume it. For more information, see issue224385.
Profilers
This section describes known issues with the Profilers.
ADB exception when debugging or profiling
When using Platform Tools 29.0.3, native debugging and the Android StudioProfilers might not work properly, and you might see either'AdbCommandRejectedException' or 'Failed to connect port' in the idea.log
file when you select Help > Show Log. Upgrading the Platform Tools to29.0.4 or higher fixes both issues.
To upgrade the Platform Tools, do the following:
- Open the SDK Manager from Android Studio by clicking Tools >SDK Manager or click SDK Managerin the toolbar.
- Click the checkbox next to Android SDK Platform-Tools so it shows a checkmark. A download icon should appear in the left column.
- Click Apply or OK.
Known issues with the Android Gradle Plugin
This section describes known issues that exist in the latest stable version ofthe Android Gradle plugin.
Missing Manifest class
If your app defines custom permissions in its manifest, the Android Gradleplugin typically generates a Manifest.java
class that includes your custompermissions as String constants. The plugin packages this class with your app,so you can more easily reference those permissions at runtime.
Generating the manifest class is currently broken in Android Gradleplugin 3.6.0 and higher. If you build your app with this version of the plugin,and it references the manifest class, you might see a ClassNotFoundException
exception. To resolve this issue, do one of the following:
- Reference your custom permissions by their fully-qualified name. For example,
'com.example.myapp.permission.DEADLY_ACTIVITY'
. Define your own constants, as shown below:
Signing file named with Carriage Return (CR) characters
JAR signing (v1 scheme) does not support file names containing CarriageReturn (CR) characters. (Seeissue #63885809).
API changes
Android Gradle Plugin 3.0.0 and higher introduce API changes that remove certainfunctionalities and may break your existing builds. Later versions of theplugin may introduce new public APIs that replace broken functionalities.
Modifying variant outputs at build time may not work
Using the Variant API to manipulate variant outputs is broken with the newplugin. It still works for simple tasks, such as changing the APK name duringbuild time, as shown below:
However, more complicated tasks that involve accessing outputFile
objectsno longer work. That's because variant-specific tasks are no longer createdduring the configuration stage. This results in the plugin not knowingall of its outputs up front, but it also means faster configuration times.
manifestOutputFile is no longer available
The processManifest.manifestOutputFile()
method is no longer available, and you get the following error when you call it:
Instead of calling manifestOutputFile()
to get the manifest file for eachvariant, you can call processManifest.manifestOutputDirectory()
to return thepath of the directory that contains all generated manifests. You can thenlocate a manifest and apply your logic to it. The sample below dynamicallychanges the version code in the manifest:
Fixed known issues
This section describes known issues that have been fixed in a recent release. Ifyou are experiencing any of these issues, you should update AndroidStudio to the latest stable or preview version.
Fixed in Android Studio 3.6
APK installation error on LineageOS: Deploying your app to devicesrunning certain versions of LineageOS or CyanogenMod might fail and throwan
INSTALL_PARSE_FAILED_NOT_APK
exception.On Android Studio 3.6 Beta 1 and higher, the IDE handles this exception byperforming a full app install when you deploy your appto LineageOS or CyanogenMod devices, which might result in longer deploytimes.
Fixed in Android Studio 3.5.2
- Broken XML code style: When editing XML code, the IDE applied anincorrect code style when you selected Code > Reformat Code from themenu bar.
Fixed in Android Studio 3.3.1
Out of memory errors when scanning C++-based projects: When Gradle scansa project that has C++ code in more than one location on the same drive, thescan includes all directories below the first common directory. Scanninga large number of directories and files may lead to out of memory errors.
For more information on this issue, readthe bug associated with theissue.