cawfree / react-native-quiet

🤫 Quiet for React Native.
173 stars 21 forks source link

A problem occurred evaluating project ':quiet'. #6

Closed mxvsh closed 4 years ago

mxvsh commented 4 years ago

My React Version:

"react": "16.9.0",
"react-native": "0.61.5",

I tried to link it manually. I followed this way.

image

image

cawfree commented 4 years ago

It doesn't look like your Android SDK directory is recognised by your OS. Can you verify its existence in your $PATH variable?

mxvsh commented 4 years ago

It's not possible that I have not set the Android SDK in $PATH, as react-naive run-android works without any error on other projects.. image

cawfree commented 4 years ago

Ah okay, thanks for checking.

So, looking at this line in particular:

image

It is complaining that it can't find a local.properties file in your root /android project. Is that the case?

mxvsh commented 4 years ago

yes, that file doesn't exists

cawfree commented 4 years ago

Okay, try creating one with the following contents:

android.useAndroidX=true
android.enableJetifier=true

Pretty surprised that this file isn't present in your project. It might be worth updating react-native init and re-running react-native-init Quiet and including this as a dependency in the new project, because I would imagine that this file would be included by default.

mxvsh commented 4 years ago

@cawfree i tried creating .a fresh project, but still getting the same error...

* What went wrong:
A problem occurred evaluating project ':quiet'.
> /Users/xen/Workspace/React-Native/Quiet/android/local.properties (No such file or directory)
cawfree commented 4 years ago

That's strange. :/ Have you tried creating the file manually?

mxvsh commented 4 years ago

I tried creating a new empty file, now the error has changed,

* What went wrong:
A problem occurred evaluating project ':quiet'.
> NDK location not found. Define location with ndk.dir in the local.properties file or with an ANDROID_NDK_ROOT environment variable.
cawfree commented 4 years ago

Okay, good. So you probably need to go ahead and configure the Android ndk.

You'll find this section of Quiet for Android useful; note how this asserts a dependency on local.properties.

I won't mark this issue as closed just yet, but it does seem like you're running into external configuration factors that aren't directly related to react-native-quiet. :)

mxvsh commented 4 years ago

@cawfree after setting up the ndk, now i am getting this another error

* What went wrong:
Execution failed for task ':quiet:ndkBuild'.
> A problem occurred starting process 'command '/Users/xen/Library/Androi/ndk/ndk-build''
bisark commented 4 years ago

@thedevxen Check for typos too, the error you pasted refers to a directory called Androi.

If not works try to see if the ndk folder has a sub directory named as the downloaded NDK version.

The result should be something like this. ndk.dir=/Users/xen/Library/Android/ndk/20.1.5948944/

JakinTayo commented 4 years ago

Alex

After following the docs I still have the Above issue.

cawfree commented 4 years ago

Hey all, since I closed the original issue it looks like I don't get visibility of any new comments.

@JakinTayo Have you confirmed s_wallet/android/local.properties exists?

By the way, Windows sometimes has issues with strange characters in filenames. What happens if you trying renaming your project to swallet?

Have you verified that you can run the example app?

JakinTayo commented 4 years ago

image

cawfree commented 4 years ago

It looks like you haven't installed the Android ndk. Please follow the ndk installation instructions carefully.

JakinTayo commented 4 years ago

So I Installed ndk and put the path in my local.properties file

image

cawfree commented 4 years ago

Does this help?

JakinTayo commented 4 years ago

No. I don't have this line in my build.gradle image

cawfree commented 4 years ago

@JakinTayo Just looking a little closer at your screenshot, where are the file path separators? :S

Screenshot 2020-04-08 at 02 13 36

JakinTayo commented 4 years ago

@cawfree I got it to work. But any time I try to npm install any package I get this error image

cawfree commented 4 years ago

Okay, that's great well done. It looks like you've installed two copies of React Native somewhere. (if you look close, your quiet node_modules has another node_modules inside.) This likely happened during your debugging. Just remove the nested directory and you should be set to go.

I'm going to close off this issue now, because these don't seem related to RNQuiet, but I will add further documentation to the README regarding the Android ndk because this seems to be tripping up quite a lot of people!

Thanks a lot!

JakinTayo commented 4 years ago

@ cawfree thanks a lot. I got it to work well. const blacklist = require('metro-config/src/defaults/blacklist');

module.exports = { resolver: { blacklistRE: blacklist([ /node_modules\/.\/node_modules\/react-native\/./, ]) }

to my metro.config file

I checked the demo site and there is an option to transmit either via audible means or ultrasonic; is this also possible in the mobile version?

JakinTayo commented 4 years ago

image

My Bundler is running perfectly but the app is saying it can't invoke RNQuiet.start.