You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React Native修改应用名称后processDebugGoogleServices任务执行失败

Fix: "No matching client found for package name 'com.newName'" After React Native Rename

This error happens because the Google Services configuration files haven’t been updated to match your new package name—react-native-rename handles core app files, but it doesn’t touch third-party service configs like Firebase/Google Services. Here’s how to fix it step by step:

For Android

  • Update your Google Services config in Firebase Console
    1. Head to your Firebase project dashboard, click "Add app" and select Android.
    2. Enter your new package name (com.newName) when prompted, then download the updated google-services.json file.
  • Replace the old config file
    Overwrite the existing file at android/app/google-services.json with the new one you just downloaded.
  • Double-check your Gradle configs
    Open android/app/build.gradle and confirm the applicationId is set to com.newName (the rename tool should have done this, but it’s worth verifying).
  • Clean build cache
    Run these commands to clear cached build data:
    cd android
    ./gradlew clean
    cd ..
    npx react-native run-android
    

For iOS (if applicable)

  • Update Firebase config for iOS
    1. In Firebase Console, add a new iOS app with your new Bundle ID (matching com.newName).
    2. Download the updated GoogleService-Info.plist file.
  • Replace the old plist file
    Swap out the file at ios/[YourAppName]/GoogleService-Info.plist with the new one.
  • Verify Xcode settings
    Open your project in Xcode, go to your target’s "Signing & Capabilities" tab, and make sure the Bundle Identifier matches com.newName.
  • Clear Xcode cache
    Delete Xcode’s Derived Data (find this via Xcode > Settings > Locations > Derived Data) then rebuild the app.

Extra Notes

If you’re using other Google services (like Google Sign-In, Maps, etc.), you’ll also need to update allowed package names/Bundle IDs in the Google Cloud Console:

  • Navigate to the Google Cloud Console, find your project, go to "APIs & Services" > "Credentials".
  • Edit any OAuth 2.0 client IDs for Android/iOS and add your new package name/Bundle ID to the authorized list.

That should resolve the "No matching client" error—your new package name will now be recognized by Google Services.

内容的提问来源于stack exchange,提问作者Asnad Atta

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 09:41:20