After I add the "google_mlkit_commons: ^0.5.0" in the pubspec.yml, still fail to import the package
this is the steps I do:
- add "google_mlkit_commons: ^0.5.0" to pubspec.yml
- modify the Podfile and run pod install
write the import statement
What API are you using?
@tklee1975
While dont you run flutter clean and flutter pub get
Hi. I am experiencing the same issue. @tklee1975 Did you manage to solve it in your case?
--
How I reproduce: I install it and it persists to not find it. Have been troubleshooting for a couple of hours now, and cleaned cache (various caches), etc.
I add in my pubspec.yaml
dependencies:
flutter:
sdk: flutter
google_mlkit_face_detection: ^0.9.0
Have additionally tried combinations of installing google_ml_kit: ^0.16.3 and google_mlkit_commons: ^0.6.1 , same result.
I upload my Podfile to include ala:
platform :ios, '13.0'
...
# Define the iOS Version for deployment target
$iOSVersion = '13.0'
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=*]"] = "armv7"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
end
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
if Gem::Version.new($iOSVersion) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
end
end
end
end
(Run pod install)
Follow up on my own message above: Figured out the issue during today, and just leaving a comment here for future reference in case it helps someone else:
I added google_mlkit_face_detection to my main flutter project, but turned out that the face detection logic is implemented as an individual package under packages/ directory, and has its own pubspec.yaml. Adding the google_mlkit_face_detection in that pubspec.yaml solved the import-issue.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.