Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android build process is broken in android studio 3.4.1 #237

Closed
generalpiston opened this issue Jun 24, 2019 · 2 comments
Closed

Android build process is broken in android studio 3.4.1 #237

generalpiston opened this issue Jun 24, 2019 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@generalpiston
Copy link
Collaborator

Description

ERROR: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
	is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
	Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at manifestMerger9060190841717192007.xml:7:5-9:19 to override.

A proper solution should work with:

  1. npm build:android:release
  2. Running an android emulator

Platform

Mac OS X 10.14.5

Reproduce (Optional)

  1. Download Android Studio 3.4.1
  2. npm i --cache /tmp/cache
  3. Open mobidex/android in android studio
  4. File > Sync Project with Gradle Files
@generalpiston generalpiston added help wanted Extra attention is needed bug Something isn't working labels Jun 24, 2019
@generalpiston
Copy link
Collaborator Author

The solution might be: facebook/react-native#25292 (comment)

generalpiston added a commit that referenced this issue Jun 25, 2019
@generalpiston
Copy link
Collaborator Author

It turns out google play services were at the root cause. There are two dependencies using them:

  1. react-native-google-analytics-bridge
  2. react-native-device-info

Version 17 of google play services with Android Studio 3.4.1 build #AI-183.6156.11.34.5522156 requires androidx. react-native supports androidx starting with 0.60. Mobidex dependencies will take some time to catch up. Mobidex will need to be upgraded to work with androidx and react-native 0.60.

The temporary fix is to set googlePlayServicesVersion to 16.0.0 in mobidex/android/build.gradle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant