Reputation: 47
I am new in react native android programming, I have discovered that adding local.properties
file are necessary in telling the package where SDK is. I did it, and after several library install later, the app cannot build with this weird "cannot determine the dependencies of :app:compileDebugJavaWithJavac
and telling me that ANDROID_HOME and SDK isn't seenable to the app. But the local.properties
are there and I have added the ANDROID_HOME on system environment variables too! What else should I do and how do I read about this problem?
Snippets of the problem:
› Building app...
Configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not determine the dependencies of null.
> SDK location not found. Define a valid SDK location with an ANDROID_HOME environment variable or by setting the sdk.dir path in your project's local properties file at 'D:\Saraya\Saraya\android\local.properties'.
* 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.
BUILD FAILED in 16s
5 actionable tasks: 5 up-to-date
Error: D:\Saraya\Saraya\android\gradlew.bat exited with non-zero code: 1
Error: D:\Saraya\Saraya\android\gradlew.bat exited with non-zero code: 1
at ChildProcess.completionListener (D:\Saraya\Saraya\node_modules\@expo\spawn-async\build\spawnAsync.js:52:23)
at Object.onceWrapper (node:events:633:26)
at ChildProcess.emit (node:events:518:28)
at cp.emit (D:\Saraya\Saraya\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1101:16)
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
...
at Object.spawnAsync [as default] (D:\Saraya\Saraya\node_modules\@expo\spawn-async\build\spawnAsync.js:17:21)
at spawnGradleAsync (D:\Saraya\Saraya\node_modules\@expo\cli\build\src\start\platforms\android\gradle.js:72:46)
at Object.assembleAsync (D:\Saraya\Saraya\node_modules\@expo\cli\build\src\start\platforms\android\gradle.js:52:18)
at runAndroidAsync (D:\Saraya\Saraya\node_modules\@expo\cli\build\src\run\android\runAndroidAsync.js:36:24)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Edit2:
For context, I was trying to add sign in with Google
with Firebase to my app. I followed this guide to this tutorial to introduce me to at least a basic concept of making these authentication process. But looks like the libraries versioning are the problem since the problem start when I add react-native/firebase
library. How do I check whether react-native and some libraries are coherent and suitable to each other?
Upvotes: 0
Views: 12