question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android: example build failed

See original GitHub issue

What I did:

  • cloned repository
  • ran yarn install in terminal in Example folder
  • ran react-native run-ios -> this was ok
  • ran react-native run-android -> failed

What went wrong:

Execution failed for task ':app:mergeDebugResources'.
> Error: java.lang.RuntimeException: com.android.builder.internal.aapt.AaptException: AAPT2 compile failed:

before the Error appears, there are few logs of this kind

> Task :app:mergeDebugResources
/Users/Pavel/.gradle/caches/transforms-1/files-1.1/appcompat-v7-24.0.0.aar/74cbb38e018f31a50b2829379ad307ae/res/values/values.xml:235:5-90: AAPT: invalid dimen

so it may be releated to appcompat-v7-24.0.0?

my setup:

  • running on macOS,
  • trying to run on device Nexus 5X Android 8.1.0 installed versions of RN on system
  • react-native-cli: 2.0.1
  • react-native: 0.51.0

what I tried:

  • Run ./gradlew clean
  • delete node_modules and run npm install instead of yarn
  • installed android SDK 24.0.0 (then tried cleaning project again, restart terminal) snimek obrazovky 2018-01-12 v 12 11 44

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
theilgazcommented, Mar 13, 2019

I’m also facing same problem. I try every solution from internet. But I’m hanging with bug still.

Did you find any solution?

0reactions
tamangsureshcommented, Oct 11, 2018

I’m also facing same problem. I try every solution from internet. But I’m hanging with bug still.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to build project with Android studio - Stack Overflow
File->Other Settings->Default Project Structure · Under Project Settings: Project, set Project SDK as Android SDK. · Click Edit button · For Android SDK,...
Read more >
Why does a build fail in Android Studio even if I don't ... - Quora
There are several causes for gradle build fail in Android studio. Few reasons might be: * Dependencies added * Importing the project from...
Read more >
Fix Gradle Build Error in Android Studio | Compilation failed
Tutorial to fix errors encountered while running the android application. This video includes some ways in which you can fix Gradle build ......
Read more >
Different Ways to fix "Error running android: Gradle project ...
Different Ways to fix “Error running android: Gradle project sync failed” in Android Studio ; Method 1: Restarting your project using Invalidate ......
Read more >
Known issues with Android Studio and Android Gradle Plugin
Find out about current known issues with Android Studio and the Android Gradle Plugin.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found