用expo更新react原生库是多么彻底的噩梦。我尝试更新代码库,以帮助我的应用程序变得最新。然而,正如预期的那样,它不像运行npm update --force:D那么容易。过去几天我一直在经历错误;今天是修复错误的第三天,直到我成功构建。今天的错误真的困扰着我。现在有人如何解决以下问题吗?:

错误

The Swift pod `ExpoModulesCore` depends upon `React-RCTAppDelegate`, which does not define modules.

我尝试将pod'ExpoModulesCore',:modular_headers => true添加到我的pod文件中,但这导致了以下错误:

[!] Unable to find a specification for `ExpoModulesCore`

…尽管我的package.json文件中有这个,我将在下面添加。package.json中的名称不同,它在单词之间有炒作。但是,如果我将名称更改为该名称,则仅使用相应的名称就会出现相同的错误。

所以我尝试了一个全局modular_headers,但随后出现了一个名空间冲突和google错误。然后我尝试添加pod 'React-RCTAppDelegate', :modular_headers => true,但出现以下错误

[!] There are multiple dependencies with different sources for `React-RCTAppDelegate` in `Podfile`:

- React-RCTAppDelegate
- React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`)

我完全不知道该怎么做了,这肯定是错误49/xxx。我将提供我的旧包.json和新包以及podfile和delegate.m和h文件。感谢任何帮助。

我降级了expo,因为它帮助我解决了另一个我遇到的错误,该错误与reatredelegate中未定义的模块有关

新包.json

{
  "scripts": {
    "start": "react-native start",
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "build:ios": "react-native bundle — entry-file index.js — platform ios — dev false — bundle-output ios/main.jsbundle — assets-dest ios"
  },
  "dependencies": {
    "@expo/vector-icons": "^13.0.0",
    "@gregfrench/react-native-wheel-picker": "^1.2.16",
    "@react-native-community/datetimepicker": "^6.7.3",
    "@react-native-community/masked-view": "0.1.10",
    "@react-native-community/push-notification-ios": "^1.10.1",
    "@react-native-firebase/app": "^17.0.0",
    "@react-native-firebase/messaging": "^17.0.0",
    "@react-native-picker/picker": "^2.4.8",
    "@reduxjs/toolkit": "^1.9.2",
    "@sentry/react-native": "^4.14.0",
    "axios": "^1.3.2",
    "buffer": "^6.0.3",
    "expo": "47.0.9",
    "expo-barcode-scanner": "~12.1.0",
    "expo-camera": "~13.1.0",
    "expo-device": "^5.0.0",
    "expo-image-manipulator": "~11.0.0",
    "expo-image-picker": "~14.1.0",
    "expo-media-library": "~15.0.0",
    "expo-modules-core": "1.1.1",
    "expo-notifications": "^0.17.0",
    "expo-permissions": "~14.0.0",
    "expo-secure-store": "~12.0.0",
    "expo-splash-screen": "^0.17.5",
    "expo-sqlite": "~11.0.0",
    "expo-status-bar": "~1.4.2",
    "expo-updates": "^0.15.6",
    "formik": "^2.2.9",
    "lodash": "^4.17.21",
    "moment": "^2.29.4",
    "react": "18.2.0",
    "react-axios": "^2.0.6",
    "react-dom": "18.2.0",
    "react-native": "^0.71.2",
    "react-native-appearance": "^0.3.4",
    "react-native-background-actions": "^3.0.0",
    "react-native-background-fetch": "^4.1.8",
    "react-native-ble-plx": "^2.0.3",
    "react-native-calendars": "^1.1293.0",
    "react-native-device-info": "^10.3.0",
    "react-native-elements": "^3.4.3",
    "react-native-fast-image": "^8.6.3",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-image-slider-box": "^2.0.7",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-keyboard-aware-scrollview": "^2.1.0",
    "react-native-permissions": "^3.6.1",
    "react-native-push-notification": "^8.1.1",
    "react-native-reanimated": "^2.14.4",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.19.0",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-switch": "^2.0.0",
    "react-native-unimodules": "^0.14.10",
    "react-native-web": "^0.18.12",
    "react-native-webview": "^11.26.1",
    "react-native-wheel-picker-android": "^2.0.6",
    "react-navigation": "^4.4.3",
    "react-navigation-stack": "^2.9.0",
    "react-redux": "^8.0.5",
    "rn-fetch-blob": "^0.12.0",
    "toggle-switch-react-native": "^3.3.0"
  },
  "devDependencies": {
    "@babel/core": "~7.20.12",
    "babel-jest": "~29.4.1",
    "jest": "^29.4.1",
    "prettier": "^2.8.3",
    "react-test-renderer": "~18.2.0",
    "typescript": "~4.9.5"
  },
  "private": true,
  "name": "pdi-app-v2",
  "version": "1.0.0"
}

旧包.json

{
  "scripts": {
    "start": "react-native start",
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "build:ios": "react-native bundle — entry-file index.js — platform ios — dev false — bundle-output ios/main.jsbundle — assets-dest ios"
  },
  "dependencies": {
    "@expo/vector-icons": "^10.0.0",
    "@gregfrench/react-native-wheel-picker": "^1.2.14",
    "@react-native-community/datetimepicker": "^3.0.9",
    "@react-native-community/masked-view": "0.1.10",
    "@react-native-community/push-notification-ios": "^1.7.1",
    "@react-native-firebase/app": "^8.4.7",
    "@react-native-firebase/messaging": "^7.9.1",
    "@react-native-picker/picker": "^1.16.1",
    "@reduxjs/toolkit": "^1.4.0",
    "@sentry/react-native": "^3.2.10",
    "axios": "^0.15.0",
    "buffer": "^6.0.2",
    "expo": "~39.0.2",
    "expo-barcode-scanner": "~9.0.0",
    "expo-camera": "~9.0.0",
    "expo-device": "~2.3.0",
    "expo-image-manipulator": "~8.3.0",
    "expo-image-picker": "~9.1.1",
    "expo-media-library": "~9.2.1",
    "expo-notifications": "0.8.2",
    "expo-permissions": "~9.3.0",
    "expo-secure-store": "~9.2.0",
    "expo-splash-screen": "~0.6.1",
    "expo-sqlite": "~8.4.0",
    "expo-status-bar": "~1.0.2",
    "expo-updates": "~0.3.3",
    "formik": "^2.2.9",
    "lodash": "^4.17.21",
    "moment": "^2.29.0",
    "react": "16.13.1",
    "react-axios": "2.0.3",
    "react-dom": "16.13.1",
    "react-native": "0.63.4",
    "react-native-appearance": "^0.3.4",
    "react-native-background-actions": "^2.6.1",
    "react-native-background-fetch": "^4.0.2",
    "react-native-ble-plx": "^2.0.3",
    "react-native-calendars": "^1.403.0",
    "react-native-device-info": "^8.1.3",
    "react-native-elements": "^2.3.2",
    "react-native-fast-image": "^8.3.4",
    "react-native-gesture-handler": "~1.7.0",
    "react-native-image-slider-box": "^1.0.12",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-keyboard-aware-scrollview": "^2.1.0",
    "react-native-permissions": "^3.0.5",
    "react-native-push-notification": "^6.1.3",
    "react-native-reanimated": "~1.13.0",
    "react-native-safe-area-context": "3.1.4",
    "react-native-screens": "~2.10.1",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-switch": "^2.0.0",
    "react-native-unimodules": "~0.11.0",
    "react-native-web": "0.14.0",
    "react-native-webview": "^10.8.2",
    "react-native-wheel-picker-android": "^2.0.6",
    "react-navigation": "^4.4.3",
    "react-navigation-stack": "^2.9.0",
    "react-redux": "^7.2.2",
    "rn-fetch-blob": "^0.12.0",
    "toggle-switch-react-native": "^2.3.0"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0",
    "babel-jest": "~25.2.6",
    "jest": "~25.2.6",
    "prettier": "^2.5.1",
    "react-test-renderer": "~16.13.1",
    "typescript": "~3.9.2"
  },
  "private": true,
  "name": "pdi-app-v2",
  "version": "1.0.0"
}

#播客文件

require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
require File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules")
pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'React-RCTAppDelegate', :modular_headers => true

$RNFirebaseAsStaticFramework = true
require 'json'
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}

platform :ios, podfile_properties['ios.deploymentTarget'] || '13.0'
install! 'cocoapods',
  :deterministic_uuids => false

target 'pdimobile' do
  use_expo_modules!
  config = use_native_modules!

  use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_flipper! # should match the version of your Flipper client app


  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => podfile_properties['expo.jsEngine'] == 'hermes',
    :fabric_enabled => flags[:fabric_enabled],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/..",
  )

  post_install do |installer|
    flipper_post_install(installer)
    react_native_post_install(
      installer,
      # Set `mac_catalyst_enabled` to `true` in order to apply patches
      # necessary for Mac Catalyst builds
      :mac_catalyst_enabled => false
    )
    __apply_Xcode_12_5_M1_post_install_workaround(installer)

    # This is necessary for Xcode 14, because it signs resource bundles by default
    # when building for devices.
    installer.target_installation_results.pod_target_installation_results
      .each do |pod_name, target_installation_result|
      target_installation_result.resource_bundle_targets.each do |resource_bundle_target|
        resource_bundle_target.build_configurations.each do |config|
          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
        end
      end
    end
  end

permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral"
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"

  post_integrate do |installer|
    begin
      expo_patch_react_imports!(installer)
    rescue => e
      Pod::UI.warn e
    end
    begin
      expo_patch_react_imports!(installer)
    rescue => e
      Pod::UI.warn e
    end
  end
end

#应用委托.h

#import <UserNotifications/UNUserNotificationCenter.h>
#import <Expo/Expo.h>
#import <Foundation/Foundation.h>
#import <EXUpdates/EXUpdatesAppController.h>
#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>

#import <UMCore/UMAppDelegateWrapper.h>

@interface AppDelegate : UMAppDelegateWrapper <RCTBridgeDelegate, EXUpdatesAppControllerDelegate, UNUserNotificationCenterDelegate>

@end

应用委托.m

#import <Firebase.h>
#import "AppDelegate.h"
#import <UserNotifications/UserNotifications.h>
#import <RNCPushNotificationIOS.h>

#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

#import <TSBackgroundFetch/TSBackgroundFetch.h>

#if RCT_DEV
#import <React/RCTDevLoadingView.h>
#endif

#import <UMCore/UMModuleRegistry.h>
#import <UMReactNativeAdapter/UMNativeModulesProxy.h>
#import <UMReactNativeAdapter/UMModuleRegistryAdapter.h>
#import <EXSplashScreen/EXSplashScreenService.h>
#import <UMCore/UMModuleRegistryProvider.h>

#ifdef FB_SONARKIT_ENABLED
#import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>

static void InitializeFlipper(UIApplication *application) {
  FlipperClient *client = [FlipperClient sharedClient];
  SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
  [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
  [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
  [client addPlugin:[FlipperKitReactPlugin new]];
  [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
  [client start];
}
#endif

@interface AppDelegate () <RCTBridgeDelegate>

@property (nonatomic, strong) UMModuleRegistryAdapter *moduleRegistryAdapter;
@property (nonatomic, strong) NSDictionary *launchOptions;

@end

@implementation AppDelegate
// Required for the register event.
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
 [RNCPushNotificationIOS didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}
// Required for the notification event. You must call the completion handler after handling the remote notification.
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
{
  [RNCPushNotificationIOS didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}
// Required for the registrationError event.
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
 [RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];
}
// Required for localNotification event
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
didReceiveNotificationResponse:(UNNotificationResponse *)response
         withCompletionHandler:(void (^)(void))completionHandler
{
  [RNCPushNotificationIOS didReceiveNotificationResponse:response];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  #ifdef FB_SONARKIT_ENABLED
    InitializeFlipper(application);
  #endif
  self.moduleRegistryAdapter = [[UMModuleRegistryAdapter alloc] initWithModuleRegistryProvider:[[UMModuleRegistryProvider alloc] init]];
  self.launchOptions = launchOptions;
  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  #ifdef DEBUG
    [self initializeReactNativeApp];
  #else
    EXUpdatesAppController *controller = [EXUpdatesAppController sharedInstance];
    controller.delegate = self;
    [controller startAndShowLaunchScreen:self.window];
  #endif

  [super application:application didFinishLaunchingWithOptions:launchOptions];

  if([FIRApp defaultApp] == nil) {
    [FIRApp configure];
  }
  
NSURL *jsCodeLocation;
    
  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; 

  RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation
                                        moduleProvider:nil
                                        launchOptions:launchOptions];

    #if RCT_DEV
      [bridge moduleForClass:[RCTDevLoadingView class]];
    #endif
      RCTRootView *rootView = [self.reactDelegate createRootViewWithBridge:bridge
                                                      moduleName:@"Test"
                                                      initialProperties:nil];                                    

  UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
  center.delegate = self;

[[TSBackgroundFetch sharedInstance] didFinishLaunching];

  return YES;
}

//Called when a notification is delivered to a foreground app.
-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
{
  if (@available(iOS 14.0, *)) {
    completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionBanner | UNNotificationPresentationOptionBadge);
  } else {
    // Fallback on earlier versions
    completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge);
  }
}

- (RCTBridge *)initializeReactNativeApp
{
  RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:self.launchOptions];
  RCTRootView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:nil];
  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

  UIViewController *rootViewController = [self.reactDelegate createRootViewController];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];

  return bridge;
 }

- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
{
  NSArray<id<RCTBridgeModule>> *extraModules = [_moduleRegistryAdapter extraModulesForBridge:bridge];
  // If you'd like to export some custom RCTBridgeModules that are not Expo modules, add them here!
  return extraModules;
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
 #ifdef DEBUG
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
 #else
  return [[EXUpdatesAppController sharedInstance] launchAssetUrl];
 #endif
}

- (void)appController:(EXUpdatesAppController *)appController didStartWithSuccess:(BOOL)success {
  appController.bridge = [self initializeReactNativeApp];
  EXSplashScreenService *splashScreenService = (EXSplashScreenService *)[UMModuleRegistryProvider getSingletonModuleForClass:[EXSplashScreenService class]];
  [splashScreenService showSplashScreenFor:self.window.rootViewController];
}

@end

Swift pod“ExpoModulesCore”依赖于“React RCTAppDelegate”`的更多相关文章

  1. HTML5在微信内置浏览器下右上角菜单的调整字体导致页面显示错乱的问题

    HTML5在微信内置浏览器下,在右上角菜单的调整字体导致页面显示错乱的问题,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧

  2. iOS实现拖拽View跟随手指浮动效果

    这篇文章主要为大家详细介绍了iOS实现拖拽View跟随手指浮动,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

  3. ios – containerURLForSecurityApplicationGroupIdentifier:在iPhone和Watch模拟器上给出不同的结果

    我使用默认的XCode模板创建了一个WatchKit应用程序.我向iOSTarget,WatchkitAppTarget和WatchkitAppExtensionTarget添加了应用程序组权利.(这是应用程序组名称:group.com.lombax.fiveminutes)然后,我尝试使用iOSApp和WatchKitExtension访问共享文件夹URL:延期:iOS应用:但是,测试NSURL

  4. ios – Testflight无法安装应用程序

    我有几个测试人员注册了testflight并连接了他们的设备……他们有不同的ios型号……但是所有这些都有同样的问题.当他们从“safari”或“testflight”应用程序本身单击应用程序的安装按钮时……达到约90%并出现错误消息…

  5. ibm-mobilefirst – 在iOS 7.1上获取“无法安装应用程序,因为证书无效”错误

    当我的客户端将他们的设备更新到iOS7.1,然后尝试从AppCenter更新我们的应用程序时,我收到了上述错误.经过一番搜索,我找到了一个类似问题的帖子here.但是后来因为我在客户端使用AppCenter更新应用程序的环境中,我无法使用USB插件并为他们安装应用程序.在发布支持之前,是否有通过AppCenter进行下载的解决方法?

  6. ios – 视图的简单拖放?

    我正在学习iOS,但我找不到如何向UIView添加拖放行为.我试过了:它说“UIView没有可见的接口声明选择器addTarget”此外,我尝试添加平移手势识别器,但不确定这是否是我需要的它被称为,但不知道如何获得事件的坐标.在iOS中注册移动事件回调/拖放操作的标准简单方法是什么?

  7. ios – 什么控制iTunes中iPhone应用程序支持的语言列表?

    什么控制iPhone应用程序的iTunes页面中支持的语言?

  8. ios – 获得APNs响应BadDeviceToken或Unregistered的可能原因是什么?

    我知道设备令牌在某些时候是有效的.用户如何使其设备令牌变坏?从关于“未注册”的文档:Thedevicetokenisinactiveforthespecifiedtopic.这是否意味着应用程序已被删除?.您应该看到四种分发方法:如果您选择AppStore或Enterprise,您将在后面的对话框中看到Xcode将APNS权利更改为生产:如果选择AdHoc或Development,则aps-environment下的文本将是开发,然后应与后端的配置匹配.

  9. ios – 当我关闭应用程序时,我从调试器获得消息:由于信号15而终止

    我怎么能解决这个问题,我不知道这个链接MypreviousproblemaboutCoredata对我的问题有影响吗?当我cmd应用程序的Q时,将出现此消息.Messagefromdebugger:Terminatedduetosignal15如果谁知道我以前的问题的解决方案,请告诉我.解决方法>来自调试器的消息:每当用户通过CMD-Q(退出)或STOP手动终止应用程序(无论是在iOS模拟器中还是

  10. ios – NSUbiquityIdentityDidChangeNotification和SIGKILL

    当应用程序被发送到后台时,我们会删除观察者吗?我遇到的问题是,当UbiquityToken发生变化时,应用程序终止,因为用户已经更改了iCloud设置.你们如何设法订阅这个通知,如果你不这样做,你会做什么来跟踪当前登录的iCloud用户?

随机推荐

  1. 如何扩展ATmega324PB微控制器的以下宏寄存器?

    我目前正在学习嵌入式,我有以下练习:展开以下宏寄存器:如果有人解决了这个问题,我将不胜感激,以便将来参考

  2. Python将ONNX运行时设置为返回张量而不是numpy数组

    在python中,我正在加载预定义的模型:然后我加载一些数据并运行它:到目前为止,它仍在正常工作,但我希望它默认返回Tensor列表,而不是numpy数组。我对ONNX和PyTorch都是新手,我觉得这是我在这里缺少的基本内容。这将使转换中的一些开销相同。

  3. 在macOS上的终端中使用Shell查找文件中的单词

    我有一个文本文件,其中有一行:我需要找到ID并将其提取到变量中。我想出了一个RexEx模式:但它似乎对我尝试过的任何东西都不起作用:grep、sed——不管怎样。我的一个尝试是:我为这样一个看似愚蠢的问题感到抱歉,但我在互联网上找不到任何东西:我在SO和SE上读了几十个类似的问题,并在谷歌上搜索了几个教程,但仍然无法找到答案。欢迎提供任何指导!

  4. react-chartjs-2甜甜圈图中只有标题未更新

    我正在使用react-chartjs-2在我的网站中实现甜甜圈图。下面是我用来呈现图表的代码。我将甜甜圈图的详细信息从父组件传递到子组件,所有道具都正确传递。当我在beforeDraw函数外部记录props.title时,它会记录正确的值,但当我在beforeDraw函数内部记录props.title时,它将记录标题的前一个值,从而呈现标题的前值。我在这里做错了什么?

  5. 如何在tkinter中使用Python生成器函数?

    生成器函数承诺使某些代码更易于编写。但我并不总是知道如何使用它们。假设我有一个斐波那契生成器函数fib(),我想要一个显示第一个结果的tkinter应用程序。当我点击“下一步”按钮时,它会显示第二个数字,依此类推。我如何构建应用程序来实现这一点?我可能需要在线程中运行生成器。但如何将其连接回GUI?

  6. 如何为每次提交将存储库历史记录拆分为一行?

    我正在尝试获取存储库的历史记录,但结果仅以单行文本的形式返回给我。

  7. 尝试在颤振项目上初始化Firebase时出错

    当尝试在我的颤振项目上初始化firebase时,我收到了这个错误有人知道我能做什么吗?应用程序分级Gradle插件Gradle项目颤振相关性我已经将firebase设置为Google文档已经在另一个模拟器上尝试过,已经尝试过创建一个全新的模拟器,已经在不同的设备上尝试过了,已经尝试了特定版本的firebase,已经尝试添加但没有任何效果,已经在youtube上看到了关于它的每一个视频,该应用程序在android和iOS两个平台上都抛出了这个错误

  8. 在unix中基于当前日期添加新列

    我试图在unix中基于时间戳列在最后一个单元格中添加一个状态列。我不确定如何继续。

  9. 麦克斯·蒙特利。我一直得到UncaughtReferenceError:当我在终端中写入node-v时,节点未定义

    如果这是您应该知道的,请确认:我已将所有shell更改为默认为zsh。当我在终端中写入node-v时,我一直收到“UncaughtReferenceError:nodeisnotdefined”。但它显示节点已安装。我是个新手,在这方面经验不足。

  10. 如何在前端单击按钮时调用后端中的函数?

    那么如何在后端添加一个新的端点,点击按钮调用这个函数。

返回
顶部