Closed lifei1245 closed 2 years ago
@lifei1245 for some reason the build is not finding the react-native-ble-plx
library, which OS are you building on? Can you trying running yarn clean-install
in the root of the project and then run yarn android
again.
@tyler-whitman I built on Windows 10 , I open the android project in android studio directly ,it seems the settings isn't correct
No variants found for ':react-native-ble-plx'. Check build files to ensure at least one variant exists.
is there something else need to do?
and it can't find com.polidea.reactnativeble.BlePackage
in MainApplication when I use react-native run-android
Did you try yarn clean-install
in the root of the project and then running yarn android
. This project uses React Native and doesn't need to be opened in Android Studio. You need to make sure to run the javascript install commands to pull down all the libraries.
You can also follow the project readme for detailed setup and getting started instructions. If those are not working for you, please let me know where you are getting stuck.
@tyler-whitman I removed temp folders manually(C:/Users/user/AppData/Local/temp and node_modules), because rm -rf
is not available on windows and the folder system is not the same with macOS or linux and then run yarn cache clean && yarn install
successfully
But I still got the same error,have you built successfully on windows before?
I resolve this by add reposity to the gradle file of react-native-ble-plx
I resolve this by add reposity to the gradle file of react-native-ble-plx
Awesome, glad you were able to resolve it. If you don't mind posting a bug over on https://github.com/dotintent/react-native-ble-plx would be great so they can get it fixed.
@lifei1245 I got the same error, can you share how to solve it ?
@boern jcenter is no longer available and google repository is not available for some area ,so adding an available repository to buildscript > repositories
like mavenCentral()
will solve the problem(tip: update the gradle version if necessary).
Context
JS logs:
is there any solution for this?