RocketChat / Rocket.Chat.ReactNative

Rocket.Chat mobile clients
https://rocket.chat
MIT License
2k stars 1.17k forks source link

Whitelabel error #3356

Closed shamsnaamir closed 3 years ago

shamsnaamir commented 3 years ago

Description:

I want to rebrand the android version. I followed Whitelabel documentations. however when I do ' yarn android-whitelabel example.package.name' I get this error: error: cannot find symbol import com.facebook.react.modules.network.CustomClientBuilder; ^ symbol: class CustomClientBuilder location: package com.facebook.react.modules.network

Environment Information:

Steps to reproduce:

  1. follow Whitelabel documentations
  2. do yarn
  3. do yarn android-whitelabel example.package.name

Expected behavior:

Compile it successfully.

Actual behavior:

this error: error: cannot find symbol import com.facebook.react.modules.network.CustomClientBuilder; ^ symbol: class CustomClientBuilder location: package com.facebook.react.modules.network

Additional context:

I ran ./android/gradlew with --info flag and got this output

Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.
file or directory '/media/shams/Movie/Projects/Projects/NikanChat/Mobile/Rocket.Chat.ReactNative/android/app/src/experimental/java', not found
file or directory '/media/shams/Movie/Projects/Projects/NikanChat/Mobile/Rocket.Chat.ReactNative/android/app/src/experimentalPlay/java', not found
file or directory '/media/shams/Movie/Projects/Projects/NikanChat/Mobile/Rocket.Chat.ReactNative/android/app/build/generated/aidl_source_output_dir/experimentalPlayDebug/compileExperimentalPlayDebugAidl/out', not found
file or directory '/media/shams/Movie/Projects/Projects/NikanChat/Mobile/Rocket.Chat.ReactNative/android/app/build/generated/renderscript_source_output_dir/experimentalPlayDebug/compileExperimentalPlayDebugRenderscript/out', not found
file or directory '/media/shams/Movie/Projects/Projects/NikanChat/Mobile/Rocket.Chat.ReactNative/android/app/src/experimental/java', not found
file or directory '/media/shams/Movie/Projects/Projects/NikanChat/Mobile/Rocket.Chat.ReactNative/android/app/src/experimentalPlay/java', not found
file or directory '/media/shams/Movie/Projects/Projects/NikanChat/Mobile/Rocket.Chat.ReactNative/android/app/build/generated/aidl_source_output_dir/experimentalPlayDebug/compileExperimentalPlayDebugAidl/out', not found
file or directory '/media/shams/Movie/Projects/Projects/NikanChat/Mobile/Rocket.Chat.ReactNative/android/app/build/generated/renderscript_source_output_dir/experimentalPlayDebug/compileExperimentalPlayDebugRenderscript/out', not found
Compiling with JDK Java compiler API.
/media/shams/Movie/Projects/Projects/NikanChat/Mobile/Rocket.Chat.ReactNative/android/app/src/main/java/chat/rocket/reactnative/networking/SSLPinningModule.java:6: error: cannot find symbol
import com.facebook.react.modules.network.CustomClientBuilder;
                                         ^
  symbol:   class CustomClientBuilder
  location: package com.facebook.react.modules.network
/media/shams/Movie/Projects/Projects/NikanChat/Mobile/Rocket.Chat.ReactNative/android/app/src/main/java/chat/rocket/reactnative/networking/SSLPinningModule.java:9: error: ReactOkHttpNetworkFetcher is not public in com.facebook.react.modules.fresco; cannot be accessed from outside package
import com.facebook.react.modules.fresco.ReactOkHttpNetworkFetcher;
                                        ^
/media/shams/Movie/Projects/Projects/NikanChat/Mobile/Rocket.Chat.ReactNative/android/app/src/main/java/chat/rocket/reactnative/networking/SSLPinningModule.java:50: error: cannot find symbol
    public class CustomClient implements CustomClientBuilder {
                                         ^
  symbol:   class CustomClientBuilder
  location: class SSLPinningModule
/media/shams/Movie/Projects/Projects/NikanChat/Mobile/Rocket.Chat.ReactNative/android/app/src/debug/java/chat/rocket/reactnative/ReactNativeFlipper.java:24: error: cannot find symbol
import com.facebook.react.modules.network.CustomClientBuilder;
                                         ^
  symbol:   class CustomClientBuilder
  location: package com.facebook.react.modules.network
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
4 errors
Task :app:compileExperimentalPlayDebugJavaWithJavac in @react-native-community_viewpager Finished

> Task :app:compileExperimentalPlayDebugJavaWithJavac FAILED
:app:compileExperimentalPlayDebugJavaWithJavac (Thread[Execution worker for ':',5,main]) completed. Took 10.123 secs.
:app:processBugsnagExperimental-play-debugManifest (Thread[Execution worker for ':',5,main]) started.

> Task :app:processBugsnagExperimental-play-debugManifest
Task :app:processBugsnagExperimental-play-debugManifest in @react-native-community_viewpager Starting
Caching disabled for task ':app:processBugsnagExperimental-play-debugManifest' because:
  Build cache is disabled
Task ':app:processBugsnagExperimental-play-debugManifest' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
Found manifest at /media/shams/Movie/Projects/Projects/NikanChat/Mobile/Rocket.Chat.ReactNative/android/app/build/intermediates/merged_manifests/experimentalPlayDebug/AndroidManifest.xml
Found manifest at /media/shams/Movie/Projects/Projects/NikanChat/Mobile/Rocket.Chat.ReactNative/android/app/build/intermediates/bundle_manifest/experimentalPlayDebug/processExperimentalPlayDebugManifest/bundle-manifest/AndroidManifest.xml
Task :app:processBugsnagExperimental-play-debugManifest in @react-native-community_viewpager Finished
:app:processBugsnagExperimental-play-debugManifest (Thread[Execution worker for ':',5,main]) completed. Took 0.069 secs.
AAPT2 aapt2-3.5.3-5435860-linux Daemon #0: shutdown

FAILURE: Build failed with an exception.
diegolmello commented 3 years ago

Duplicated https://github.com/RocketChat/Rocket.Chat.ReactNative/issues/3267

OsamaWork1 commented 1 year ago

Can someone tell me how this issue was fixed? I am facing the same thing and the Duplicate issue URL is broken