react-native-code-push:compiledebugjavawithjavac failed with react-native 0.66.4 - android

I have created two application, the first one was with react-native 0.65.1 and the second one with react-native 0.66.4
before putting my apps on play store I decide to integrate react-native-code-push . every thing work with the first app react-native 0.65.1 but when I follow the same steps to integrate code-push in the second app react-native 0.66.4 I got this error after running npx react-native run-android
the error:
> Task :react-native-code-push:compileDebugJavaWithJavac FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
I tried to run cd android && ./gradlew clean but it doesn't work.
code-push version in my two projects is: "react-native-code-push": "^7.0.4"

Related

Dev Client: No common URI schemes could be found for the native iOS and Android projects

I'm trying to run project on React Native using command expo run:android. Connected an android device.
Build successful. Then I get this message in console
BUILD SUCCESSFUL in 30s 294 actionable tasks: 2 executed, 292
up-to-date
Dev Client: No common URI schemes could be found for the native iOS
and Android projects, this is required for opening the project
Add a common scheme with npx uri-scheme add my-scheme or provide a
scheme with the --scheme flag
You can see all of the existing schemes for your native projects by
running npx uri-scheme list
Starting Metro Bundler
No scheme specified for development client
Check URI schemes by npx uri-scheme list
› iOS: Schemes for config: ./ios\DogSafeProject\Info.plist
› Android: Schemes for config:
./android\app\src\main\AndroidManifest.xml
Please help me!
I was having the same issue and running this script in my terminal got the job done.
npx uri-scheme add <app name>.
That happened to me as well after upgrading dependencies in package.json.
You need to add uri-scheme package to your project with npm install uri-scheme, then recreate Android and iOS projects with expo eject. You may need to remove those directories and perform clean expo eject if still having error after install. After that expo run:android should work again :-)
I simply updated my expo-cli using: yarn global add expo-cli or npm install -g expo-cli
I have the same issue and running this script in my terminal got the job done
yarn add expo-dev-client or
npm install expo-dev-client
For me it was because my npm start was set to "expo start --dev-client" where the flag was not supposed to be there

react-native run-android issue - error Android project not found

I create a react native app in C9. Now, I want to develop this app on my local machine with android settings. I downloaded the project.
cd myProjectFolder
react-native start
npm install
react-native run-android
Also, I add a project name in package.json.
The error is below:
error Android project not found. Are you sure this is a React Native project?
If android project/folder does not exit in your root project then run :
react-native eject
I encountered this issue after I ruan ./gradlew clean. Tried serval methods but vain. Then I ran ./gradlew in the Android directory. It worked for me.
// Android
./gradlew

Unable to run latest react-native app on android

I have created a fresh app from react-native-cli.
The generated boilerplate had the following versions.
React-native: 0.57.8
React: 16.6.3
Gradle Version: 4.4
Java Version (JDK): 1.8.0_191-b12
I am unable to execute react-native run-android
I get the following error
What went wrong:
A problem occurred configuring project ':app'.
Could not generate a proxy class for class com.android.build.gradle.tasks.BuildArtifactReportTask.
I want to know whether the error is due to react version or gradlew
P.S. Application builds and installs on device / emulator when running through Android Studio but not when running via react-native-cli
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Please update the JDK version after that go to the inside android folder and use this cmd
./gradlew clean
after cleaning gradle try to build again.

React native bundlle js stuck

When I run react-native run-android --variant=Release or any other variant I defined in build.gradle I got stuck on Building 91% > :app:bundleReleaseJsAndAssets. If I run just debug it works fine. It happens as well when running ./gradlew assambleRelease.
When I manually run Build apk from Android Studio, then it successfully creates the apks.
EDIT: When I run apk generated from Android Studio, the app crashes on run. I expect this is due AppRegistry.registerComponent fails when you usually run the app trough studio not trough react-native cli
Usually it takes time in first round. Just try again and in my case it took around 10 mins to build the release.

Trouble running existing react-native project on Android emulator

I’m currently trying to set up an existing react-native project on an android emulator (OSX).
I’m having some trouble with this error particularly:
Execution failed for task :react-native-lock:processReleaseResources
After running $(npm bin)/react-native run-android.
Any wisdom would be super appreciated!
Try using
cd android
./gradlew clean
cd..
react-native run-android

Categories

Resources