1

Here are my steps:

react-native init app

cd app

react-native run-android

A problem occurred configuring project ':app'. java.lang.NullPointerException (no error message)`

cd android && ./gradlew installDebug --info

Parsing /Users/xxxx/Library/Android/sdk/tools/package.xml

file or directory '/Users/xxxx/Projects/personal/app/android/app/libs', not found

file or directory '/Users/xxxx/Projects/personal/app/android/app/libs', not found

file or directory '/Users/xxxx/Projects/personal/app/android/app/libs', not found

file or directory '/Users/xxxx/Projects/personal/app/android/app/libs', not found

Using incremental javac compilation.

Incremental java compilation is an incubating feature.

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring project ':app'. java.lang.NullPointerException (no error message)

I do not know what the problem is here. Why is gradle looking for a lib that doesn't exist? Why is react-native not creating this directory?

1 Answer 1

5

For anyone who runs into this - for me it was because the SDK path was not working for some part of the process. I had export ANDROID_HOME="~/Library/Android/sdk/" which fails for this, whereas export ANDROID_HOME="/Users/username/Library/Android/sdk/" works fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.