HarishJangra / react-native-easy-starter

A react-native starter kit using RN0.63, Flipper support, LogBox, AndroidX, Hooks workflow, easy-peasy, code-push, Themes support and much more
MIT License
257 stars 92 forks source link

Seems broken ( cannot build at all ) #8

Closed VansonLeung closed 5 years ago

VansonLeung commented 5 years ago

Hi, I have just tried starting up with iOS simulator. It is showing these errors:

  1. i18n library error (solved by deleting the missing lib)
  2. RCTGeoLocation library error (solved by deleting the missing lib
  3. react-native-keychain library missing (solved by installing back react-native-keychain)
  4. node_modules/react-native/scripts/.packager.env : No such file or directory (don't know if it will make APP broken or not yet )
  5. iOS simulator Red screen - Native module cannot be null. - NativeEventEmitter.js:36:16 (Don't know the cause, unable to fix)
HarishJangra commented 5 years ago

Sorry to say i don't have access to mac. so i never debug it on ios. It is working fine on android. It is mainly caused as some libraries are added and deleted. Please go through RN0.60 docs and libraries used for setting up in ios Please understand

If you find a solution. A pr is welcome.

drtobbyas commented 5 years ago

Can not build on ubuntu 18.04. Spent a whole day trying different fixes for the various problem I come across. Getting fed up. Please help

HarishJangra commented 5 years ago

@drtobbyas what is the problem you are facing..please add error logs etc Also add your runtime environment react-native-cli version etc

drtobbyas commented 5 years ago

@HarishJangra This is the error I'm getting This is my system spec System platform linux

arch x64
cpu 4 cores Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz directory /home/drtob

JavaScript node 10.16.0 /home/drtob/.nvm/versions/node/v10.16.0/bin/node npm 6.9.0 /home/drtob/.nvm/versions/node/v10.16.0/bin/npm
yarn 1.17.3 /usr/bin/yarn

React Native react-native-cli 2.0.1

Android java 1.8.0_212 /usr/bin/java
android home - /home/drtob/Android/Sdk

Ubuntu 18.04 Lubuntu desktop installed

MY PACKAGE.JSON { "name": "ninini", "version": "1.0.4", "private": true, "scripts": { "start": "react-native start", "android": "react-native run-android", "android:dev": "react-native run-android --appIdSuffix debug", "clean:debug": "cd android/ && ./gradlew clean && cd .. && react-native run-android --appIdSuffix debug", "clean:android": "cd android/ && ./gradlew clean && cd .. && react-native run-android", "clean:build": "cd android/ && ./gradlew clean && ./gradlew assembleRelease", "android:build": "cd android && ./gradlew assembleRelease", "android:install": "cd android && ./gradlew assembleRelease && ./gradlew installRelease", "android:menu": "adb shell input keyevent 82", "test": "jest", "lint": "eslint .", "postinstall": "npx jetify" }, "dependencies": { "@react-native-community/async-storage": "^1.5.0", "@react-native-community/cli": "^2.0.2", "@react-native-community/netinfo": "^3.2.1", "apisauce": "^1.0.3", "babel-plugin-transform-remove-console": "^6.9.4", "easy-peasy": "^2.6.5", "i18n-js": "^3.2.1", "lodash": "^4.17.11", "moment": "^2.24.0", "prop-types": "^15.7.2", "react": "16.8.6", "react-native": "0.60.0", "react-native-animatable": "^1.3.2", "react-native-gesture-handler": "^1.3.0", "react-native-keychain": "^3.1.1", "react-native-modal": "^11.1.0", "react-native-paper": "^2.16.0", "react-native-reanimated": "^1.1.0", "react-native-tiny-toast": "^1.0.3", "react-native-vector-icons": "^6.6.0", "react-navigation": "^3.11.0", "react-navigation-animated-switch": "^0.2.1", "redux-logger": "^3.0.6" }, "devDependencies": { "@babel/core": "^7.5.0", "@babel/preset-react": "^7.0.0", "@babel/runtime": "^7.5.0", "babel-eslint": "^10.0.2", "babel-jest": "^24.8.0", "eslint-config-airbnb": "^17.1.1", "jest": "^24.8.0", "jetifier": "^1.6.1", "metro-react-native-babel-preset": "^0.55.0", "prettier-eslint": "^9.0.0", "react-test-renderer": "16.8.6", "remote-redux-devtools": "^0.5.16" }, "jest": { "preset": "react-native" } }

$ yarn android:dev yarn run v1.17.3 $ react-native run-android --appIdSuffix debug info JS server already running. info Installing the app...

Configure project :app WARNING: API 'variantOutput.getPackageApplication()' is obsolete and has been replaced with 'variant.getPackageApplicationProvider()'. It will be removed at the end of 2019. For more information, see https://d.android.com/r/tools/task-configuration-avoidance. To determine what is calling variantOutput.getPackageApplication(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.

Task :app:compileDebugJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings 29 actionable tasks: 1 executed, 28 up-to-date /mnt/01D47BE1D8128F20/drtob/goodies/programming/olalomitv/react-native-easy-starter/android/app/src/main/java/com/olalomitv/MainApplication.java:4: error: cannot find symbol import com.facebook.react.PackageList; ^ symbol: class PackageList location: package com.facebook.react /mnt/01D47BE1D8128F20/drtob/goodies/programming/olalomitv/react-native-easy-starter/android/app/src/main/java/com/olalomitv/MainApplication.java:32: error: cannot find symbol List packages = new PackageList(this).getPackages(); ^ symbol: class PackageList 2 errors

FAILURE: Build failed with an exception.

BUILD FAILED in 18s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 /mnt/01D47BE1D8128F20/drtob/goodies/programming/olalomitv/react-native-easy-starter/android/app/src/main/java/com/olalomitv/MainApplication.java:4: error: cannot find symbol import com.facebook.react.PackageList; ^ symbol: class PackageList location: package com.facebook.react /mnt/01D47BE1D8128F20/drtob/goodies/programming/olalomitv/react-native-easy-starter/android/app/src/main/java/com/olalomitv/MainApplication.java:32: error: cannot find symbol List packages = new PackageList(this).getPackages(); ^ symbol: class PackageList 2 errors

FAILURE: Build failed with an exception.

BUILD FAILED in 18s

at checkExecSyncError (child_process.js:629:11)
at execFileSync (child_process.js:647:13)
at runOnAllDevices (/mnt/01D47BE1D8128F20/drtob/goodies/programming/olalomitv/react-native-easy-starter/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:75:39)
at buildAndRun (/mnt/01D47BE1D8128F20/drtob/goodies/programming/olalomitv/react-native-easy-starter/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:137:41)
at then.result (/mnt/01D47BE1D8128F20/drtob/goodies/programming/olalomitv/react-native-easy-starter/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:103:12)
at process._tickCallback (internal/process/next_tick.js:68:7)

error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

HarishJangra commented 5 years ago

@drtobbyas - Please double check your package names in android folder , AndroidManifest.xml , Mainapplication.java etc

HarishJangra commented 5 years ago

fixed in new release