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.

Unable to build successfully for Android

See original GitHub issue

I’m getting the following error.

`FAILURE: Build failed with an exception.

 What went wrong:
Execution failed for task ':posthog-react-native:generateDebugRFile'.
This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the file and retry.

I’ve followed all the instructions in the guide. AndroidX is enabled in Maybe it’s related to a new third-party library which was added recently. My environment - Mac OS Big Sur. Tried even on windows 10 but got the same exact error.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

saleheenkhancommented, Oct 4, 2021

I all Thanks for showing up for help I have solved the problem by moving the from /android/app/ folder to /android/ folder

btw here is my file

muhsin-kcommented, Oct 4, 2021

@saleheenkhan Can you please share the contents of the file in the android/app/ folder?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Known issues with Android Studio and Android Gradle Plugin
The Build System will then be properly notified about file changes by Gradle file watching and incremental changes will be successfully applied.
Read more >
Unable to build project in Android Studio - Stack Overflow
I imported a project into Android Studio from Eclipse. It was building successfully in Eclipse. At the end of importing process I got...
Read more >
[FIXED] Android build failures `No matching variant of ... - GitHub
Description Hey all, I'd like to share an update on a series of build failures React Native & Expo users have been experiencing...
Read more >
Why does a build fail in Android Studio even if I don't ... - Quora
Build fails are normal in Android studio. I have faced a million times. It may occure if your Android Studio is not updated....
Read more >
Unable to build to Android in 2021.3.6f1 - Unity Forum
Android build not building: First, make a blank project with a single blank scene and prove that it builds successfully. If it does...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found