Cannot build Android app after RN upgrade
js-qstudio opened this issue · comments
js-qstudio commented
Bug
A problem occurred evaluating project ':app'.
> Project with path ':react-native-community_art' could not be found in project ':app'.
I've tried react-native link and manual installation. Both not working.
Environment info
react-native info
output:
System:
OS: macOS 10.15.3
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 18.86 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.14.1 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.2, 28.0.3
System Images: android-19 | Google APIs ARM EABI v7a, android-19 | Google APIs Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom
Android NDK: 17.1.4828580
IDEs:
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: ^16.13.1 => 16.13.1
react-native: ^0.61.5 => 0.61.5
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Library version: 1.2.0
Steps To Reproduce
- RN upgrade 0.59.9 -> 0.61.5
- Migrate to react-native-community/art
Describe what you expected to happen:
- app builds correctly
Danila Nikonec commented
same
Pedro commented
Make sure for manual installation you have:
in android/settings.gradle
include ':app'
+ include ':@react-native-community_art'
+ project(':@react-native-community_art').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/art/android')
...
in android/app/build.gradle
dependencies {
+ implementation project(':@react-native-community_art')
...
}
In android/app/src/main/java/com/EXAMPLE/MainApplication.java
, add the ARTPackage dependency.
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
+ import com.reactnativecommunity.art.ARTPackage;
import java.util.Arrays;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
...
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
+ new new ARTPackage()
);
}
}
js-qstudio commented
@pedrosobral yes, checked all -- same changes
js-qstudio commented
"@" is wrong
in android/settings.gradle
include ':app'
+ include ':react-native-community_art'
+ project(':react-native-community_art').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/art/android')
...
in android/app/build.gradle
dependencies {
+ implementation project(':react-native-community_art')
...
}
thats worked
please, update manual instuctions