Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSuchMethodError: The method 'replaceAll' was called on null. #7

Closed
josipbernat opened this issue Mar 1, 2021 · 9 comments
Closed

Comments

@josipbernat
Copy link

Hi,

I have Flutter project and when I try to change bundleId I am getting following crash:

Updating build.gradle File
Updating Main Manifest file
Updating Debug Manifest file
Updating Profile Manifest file
Project is using kotlin
Updating MainActivity.kt
Unhandled exception:
NoSuchMethodError: The method 'replaceAll' was called on null.
Receiver: null
Tried calling: replaceAll("xxxxx__old_bundle_id___xxxxx", "xxxxx__new_bundle_id___xxxxx")
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      replaceInFile (package:change_app_package_name/file_utils.dart:5:23)
<asynchronous suspension>
#2      AndroidRenameSteps._replace (package:change_app_package_name/android_rename_steps.dart:78:11)
#3      AndroidRenameSteps.updateMainActivity (package:change_app_package_name/android_rename_steps.dart:66:13)
<asynchronous suspension>
#4      AndroidRenameSteps.process (package:change_app_package_name/android_rename_steps.dart:40:11)
<asynchronous suspension>
#5      ChangeAppPackageName.start (package:change_app_package_name/change_app_package_name.dart:12:40)
#6      main (file:///Users/josipbernat/Software/flutter/.pub-cache/hosted/pub.dartlang.org/change_app_package_name-0.1.2/bin/main.dart:4:24)
#7      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#8      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
pub finished with exit code 255
@atiqsamtia
Copy link
Owner

Interesting!

Would you be able to share android directory structure with files list?

@singhayush1403
Copy link

Getting the same error

@houdayec
Copy link

Same here.

@houdayec
Copy link

houdayec commented Mar 23, 2021

It would be great to handle error and show which file is not found in project.

@saigkl
Copy link

saigkl commented Mar 24, 2021

Getting the same error.

@Souvik73
Copy link

I am also getting this error

@MALLORY8K
Copy link

same here

@atiqsamtia
Copy link
Owner

I tested with different projects and I can't reproduce the error. Can anyone share the directory structure of the android directory here so I could get a better idea?

@atiqsamtia
Copy link
Owner

Fic for this is published to pub.dev Please report if you face the issue again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants