No variants found for `react-native-reanimated` - react-native

I upgraded my React Native project to Gradle 7.0.2 and now when I open Android Studio it says No variants found for ':react-native-reanimated'. I'm using react-native-reanimated#1.13.3, and from the documentation for versions 1.x.x there's no real configuration, so I'm not sure how to approach this.
Has anyone run into anything similar? I'm using react-native#0.63.4, gradle 7.0.2, and Android Gradle Plugin 7.0.0.

You need to downgrade your Gradle version 7 to 6 because somehow Gradle 7 not work with react-native-reanimated 1.13.3. You can downgrade the version from gradle-wrapper.properties file like below:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip

Related

How to select correct gradle version in React Native

I never upgraded my gradle since 4.3 and now i decided to upgrade my libs. Firstly i updated my react native version to 0.63. And now thinking to upgrade gradle as well. But cannot decide which version to upgrade?
Is there any docs for that, or always it should be updated to latest version?
EDIT: Got these errors below while updating

Android Studio no syntax highlighting

Okay, I've wanted to give React Native a try, did a fresh install of Android Studio 4.1.1 on my Ubuntu 19.10, bootstrapped a simple project via react-native CLI, opened it and instantly noticed that JSX highlighting is broken, google around, but the only thing I found is this link -
https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000161950-JSX-Syntax-Highlighting-not-working
Tried to reboot, to create a new project from scratch, I did not load my PyCharm settings when installed Android Studio, have not installed any plugins yet. So yeah - any ideas how do I get my highlighting working?
UPD: code navigation also seems to be broken. May be I need to try other version of Android Studio...
UPD 2: Tried Expo with Typescript project setup, studio asked to install a plugins that supports tsx, then restarted and now even the comments are not supported lol.
Note that Android Studio does not have support for JavaScript. You may want to try IntelliJ IDEA Ultimate Edition or WebStorm if you do not need to work with Java.

Ionic Capacitor Barcode Scanner

I'm building android app using ionic4 and capacitor. I intent to use phonegap-plugin-barcodescanner in my app. But after installing that plugins, I began to fail building my apk. The hint I get from my Android Studio IDE is, that my app gradle using 'com.android.support:appcompat-v7:28.0.0', and the cordova gradle using "com.android.support:support-v4:27.+". I've tried to edit the cordova gradle to v4:28.0.0 (In Android Studio IDE), but still not working. What should I do?
My stack is:
node.js 6.4.1
ionic 4.12.0
angular 7.3.9
capacitor 1.0
and plugins phonegap-plugin-barcodescanner ^8.1.0
Could you show us the build.gradle files entirely?
I installed the plug-in on my project with Capacitor, and there was no problem.
Remove the plug-in, and do these steps :
npm install phonegap-plugin-barcodescanner
npm install #ionic-native/barcode-scanner
ionic cap sync
from https://ionicframework.com/docs/native/barcode-scanner
I was dealing with issues using android and not androidX, so I did then :
Refactor --> Migrate to AndroidX --> No Backup --> Do Refactor
Then do Build --> Rebuild Project
This worked for me

Unable to run react native project due to java version 10

I have got the react native installation done but with latest jdk version that is v10.
Now when I try to run the project using the command react-native run-android, I am getting the following error,
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine java version from '10'.
I'm pretty much new to the MAC environment, How do I roll back to the previous working version of java in Mac?
How I can fix this issue?
You need a change in the Android
Gradle properties file.
PROJECT_PATH/android/gradle/wrapper/gradle-wrapper.properties
Update your distributionUrl to the following
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-rc-2-all.zip
Downgrade the Java version.
This is a problem with the latest version of java.

How to setup Typescript for Ionic v2 in IntelliJ IDEA

Ionic has recently upgraded to version 2 which is well-supported with TypeScript.
I'm now using IntelliJ IDEA to work with it, but don't know how to setup TypeScript to work with them.
So, how to set-up the ionic project in version 2 to work with TypeScript?
With the latest ionic#beta you can do ionic start myapp --v2 --ts to download the Typescript version of the starter.