# React Native CLI  project does not work on Android with a Mac M1 Max

**URL:** <https://discuss.gradle.org/t/react-native-cli-project-does-not-work-on-android-with-a-mac-m1-max/42148>\
**Category:** Help/Discuss\
**Created:** [February 4, 2022, 4:06am UTC](https://discuss.gradle.org/t/react-native-cli-project-does-not-work-on-android-with-a-mac-m1-max/42148 "2022-02-04T04:06:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xlangit](https://avatars.discourse-cdn.com/v4/letter/x/85e7bf/32.png) [@xlangit](https://discuss.gradle.org/u/xlangit)\
**Post date:** [February 4, 2022, 4:06am UTC](https://discuss.gradle.org/t/react-native-cli-project-does-not-work-on-android-with-a-mac-m1-max/42148/1 "2022-02-04T04:06:34Z")

</div>

I have a Mac m1 Max, trying to get a fresh project running,it is runing IOS without problem, but no luck on android, the error message I’m getting is the following when trying to build and run using react-native run-android --verbose  
The following errors are reported:

I did install java with sdkman:

```
        | 8.0.322 | zulu | installed | 8.0.322-zulu

```

error Failed to install the app. Make sure you have the Android development environment set up: [Setting up the development environment · React Native](https://reactnative.dev/docs/environment-setup).

Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

Warning: Mapping new ns [http://schemas.android.com/repository/android/common/02](http://schemas.android.com/repository/android/common/02) to old ns [http://schemas.android.com/repository/android/common/01](http://schemas.android.com/repository/android/common/01)

Warning: Mapping new ns [http://schemas.android.com/repository/android/generic/02](http://schemas.android.com/repository/android/generic/02) to old ns [http://schemas.android.com/repository/android/generic/01](http://schemas.android.com/repository/android/generic/01)

Warning: Mapping new ns [http://schemas.android.com/sdk/android/repo/addon2/02](http://schemas.android.com/sdk/android/repo/addon2/02) to old ns [http://schemas.android.com/sdk/android/repo/addon2/01](http://schemas.android.com/sdk/android/repo/addon2/01)

Warning: Mapping new ns [http://schemas.android.com/sdk/android/repo/addon2/03](http://schemas.android.com/sdk/android/repo/addon2/03) to old ns [http://schemas.android.com/sdk/android/repo/addon2/01](http://schemas.android.com/sdk/android/repo/addon2/01)

Warning: Mapping new ns [http://schemas.android.com/sdk/android/repo/repository2/02](http://schemas.android.com/sdk/android/repo/repository2/02) to old ns [http://schemas.android.com/sdk/android/repo/repository2/01](http://schemas.android.com/sdk/android/repo/repository2/01)

Warning: Mapping new ns [http://schemas.android.com/sdk/android/repo/repository2/03](http://schemas.android.com/sdk/android/repo/repository2/03) to old ns [http://schemas.android.com/sdk/android/repo/repository2/01](http://schemas.android.com/sdk/android/repo/repository2/01)

Warning: Mapping new ns [http://schemas.android.com/sdk/android/repo/sys-img2/03](http://schemas.android.com/sdk/android/repo/sys-img2/03) to old ns [http://schemas.android.com/sdk/android/repo/sys-img2/01](http://schemas.android.com/sdk/android/repo/sys-img2/01)

Warning: Mapping new ns [http://schemas.android.com/sdk/android/repo/sys-img2/02](http://schemas.android.com/sdk/android/repo/sys-img2/02) to old ns [http://schemas.android.com/sdk/android/repo/sys-img2/01](http://schemas.android.com/sdk/android/repo/sys-img2/01)

Warning: unexpected element (uri:“”, local:“base-extension”). Expected elements are \<{}codename\>,\<{}layoutlib\>,\<{}api-level\>

FAILURE: Build failed with an exception.

- What went wrong:

Execution failed for task ‘:app:processDebugResources’.

> Could not resolve all files for configuration ‘:app:debugRuntimeClasspath’.

> Failed to transform appcompat-1.3.0.aar (androidx.appcompat:appcompat:1.3.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.

```
  > Execution failed for AarResourcesCompilerTransform: /Users/xlan/.gradle/caches/transforms-3/d7f19fb48ed68be2921ae87dc8e58f8e/transformed/appcompat-1.3.0.

     > AAPT2 aapt2-4.2.2-7147631-osx Daemon #1: Daemon startup failed

       This should not happen under normal circumstances, please file an issue if it does.

```

> Failed to transform core-1.5.0.aar (androidx.core:core:1.5.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.

```
  > Execution failed for AarResourcesCompilerTransform: /Users/xlan/.gradle/caches/transforms-3/540dbfb90b248d7b59cd154497c15f99/transformed/core-1.5.0.

     > AAPT2 aapt2-4.2.2-7147631-osx Daemon #0: Daemon startup failed

       This should not happen under normal circumstances, please file an issue if it does.

```

> Failed to transform core-1.5.0.aar (androidx.core:core:1.5.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.

```
  > Execution failed for AarResourcesCompilerTransform: /Users/xlan/.gradle/caches/transforms-3/540dbfb90b248d7b59cd154497c15f99/transformed/core-1.5.0.

     > AAPT2 aapt2-4.2.2-7147631-osx Daemon #0: Daemon startup failed

       This should not happen under normal circumstances, please file an issue if it does.

```

> Failed to transform core-1.5.0.aar (androidx.core:core:1.5.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.

```
  > Execution failed for AarResourcesCompilerTransform: /Users/xlan/.gradle/caches/transforms-3/540dbfb90b248d7b59cd154497c15f99/transformed/core-1.5.0.

     > AAPT2 aapt2-4.2.2-7147631-osx Daemon #0: Daemon startup failed

       This should not happen under normal circumstances, please file an issue if it does.

```

> Failed to transform core-1.5.0.aar (androidx.core:core:1.5.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.

```
  > Execution failed for AarResourcesCompilerTransform: /Users/xlan/.gradle/caches/transforms-3/540dbfb90b248d7b59cd154497c15f99/transformed/core-1.5.0.

     > AAPT2 aapt2-4.2.2-7147631-osx Daemon #0: Daemon startup failed

       This should not happen under normal circumstances, please file an issue if it does.

```

> Failed to transform core-1.5.0.aar (androidx.core:core:1.5.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.

```
  > Execution failed for AarResourcesCompilerTransform: /Users/xlan/.gradle/caches/transforms-3/540dbfb90b248d7b59cd154497c15f99/transformed/core-1.5.0.

     > AAPT2 aapt2-4.2.2-7147631-osx Daemon #0: Daemon startup failed

       This should not happen under normal circumstances, please file an issue if it does.

```

> Failed to transform core-1.5.0.aar (androidx.core:core:1.5.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.

```
  > Execution failed for AarResourcesCompilerTransform: /Users/xlan/.gradle/caches/transforms-3/540dbfb90b248d7b59cd154497c15f99/transformed/core-1.5.0.

     > AAPT2 aapt2-4.2.2-7147631-osx Daemon #0: Daemon startup failed

       This should not happen under normal circumstances, please file an issue if it does.

```

> Failed to transform core-1.5.0.aar (androidx.core:core:1.5.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.

```
  > Execution failed for AarResourcesCompilerTransform: /Users/xlan/.gradle/caches/transforms-3/540dbfb90b248d7b59cd154497c15f99/transformed/core-1.5.0.

     > AAPT2 aapt2-4.2.2-7147631-osx Daemon #0: Daemon startup failed

       This should not happen under normal circumstances, please file an issue if it does.

```

- 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](https://help.gradle.org)

BUILD FAILED in 16m 10s

```
at makeError (/Users/xlan/projects/baredemo/node_modules/execa/index.js:174:9)

at /Users/xlan/projects/baredemo/node_modules/execa/index.js:278:16

at processTicksAndRejections (node:internal/process/task_queues:96:5)

at async runOnAllDevices (/Users/xlan/projects/baredemo/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)

at async Command.handleAction (/Users/xlan/projects/baredemo/node_modules/@react-native-community/cli/build/index.js:192:9)

```

---

<div class="post-metadata">

**Author:** ![yalcinozer](https://avatars.discourse-cdn.com/v4/letter/y/c89c15/32.png) [@yalcinozer](https://discuss.gradle.org/u/yalcinozer)\
**Post date:** [September 5, 2022, 10:00pm UTC](https://discuss.gradle.org/t/react-native-cli-project-does-not-work-on-android-with-a-mac-m1-max/42148/2 "2022-09-05T22:00:52Z")

</div>

Same situation here. I have spent days until realizing this. Same projects builds a APK on Linux, but on a Mac with a M1 CPU it fails. I have to use two devices to maintain the project.

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [September 27, 2022, 12:42pm UTC](https://discuss.gradle.org/t/react-native-cli-project-does-not-work-on-android-with-a-mac-m1-max/42148/3 "2022-09-27T12:42:45Z")

</div>

Well, the error suggests to report an issue, so I suggest you do that.  
But not here which is not for reporting bugs and actually not at Gradle at all, as the message comes from `AarResourcesCompilerTransform` which is a class of the Android Gradle Plugin.  
So it should be reported on the Google Android bug tracker if there is none yet. 🙂
