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.

A problem occurred configuring project ':@react-native-community_async-storage'.

See original GitHub issue

I want to:

Do a build for android

Details:

So I’m having an error when doing a build:

A problem occurred configuring project ‘:@react-native-community_async-storage’. SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0'
        classpath 'com.google.gms:google-services:4.2.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}

subprojects {
    afterEvaluate { project ->
        android {
            compileSdkVersion 28
            buildToolsVersion "28.0.3"
        }
    }
}

settings.gradle

rootProject.name = 'armadillo'
include ':@react-native-community_async-storage'
project(':@react-native-community_async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/async-storage/android')

include ':react-native-firebase'
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')

include ':react-native-device-info'
project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')

include ':react-native-config'
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')

include ':react-native-camera'
project(':react-native-camera').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-camera/android')

include ':react-native-linear-gradient'
project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android')

include ':react-native-svg'
project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')

include ':app'

local.properties

sdk.dir = /Users/{myUserName}/Library/Android/sdk

Versions:

"@react-native-community/async-storage": "^1.6.1",
"react": "^16.8.3",
"react-native": "^0.59.0",

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:7

github_iconTop GitHub Comments

4reactions
menarayanzshresthacommented, Oct 23, 2019

In my Case I used : sdk.dir = C:\Users\Lenovo\AppData\Local\Android\sdk in local.properties file .

#Note: If you are using your phone as emulator, keep in plugged with the USB Debugging mode ON.

This is how i solved .

0reactions
pedromelo98commented, Oct 17, 2019

yea, it appears that you do not have jetify installed. So you may wanna put that in your modules first.

yep, to do it use npm i jetifier

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - How to fix: A problem occurred configuring project
I tried to npm install, re-install the component with yarm, and others. "dependencies": { "@react-native-community/async-storage": "^1.4.2", " ...
Read more >
A problem occurred configuring project app in react native
1. Open your android studio application and select the SDK manager option from the TOOL menu. · 2. Select the latest android SDK...
Read more >
Installation | Async Storage - GitHub Pages
CLI autolink feature links the module while building the app. On iOS, use CocoaPods to add the native RNAsyncStorage to your project: npx...
Read more >
@react-native-community/async-storage - npm package | Snyk
We found a way for you to contribute to the project! Looks like @react-native-community/async-storage is missing a security policy.
Read more >
Android App build error - I have no idea what to do
Hi, unfortunately, I now always get an error when I try to build an Android app ... Configure project :react-native-community-async-storage
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