Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fastlane & Flutter - Google Api Error: Invalid request - Access Not Configured. Google Play

What causes this error when using Fastlane and Flutter after running this :

bundle exec fastlane beta

Google Api Error: Invalid request - Access Not Configured. Google Play Developer API has not been used in project before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/androidpublisher.googleapis.com/overview?project=xxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

When the Service Account is enabled and linked to the Play Store account with Release Manager, I read different conversations on github, but I couldnt get clear answers, I tried to increase the version of my APK since I uploaded one, but no luck.

This is my code in the Fastfile :

update_fastlane

default_platform(:android)

platform :android do
  desc "Runs all the tests"
  lane :test do
    gradle(task: "test")
  end

  desc "Deploy an beta new version to the Google Play"
  lane :beta do
       gradle(
           task: 'assemble',
           build_type: 'Release'
         )
     upload_to_play_store(track: 'beta',
     version_code: 5,
     aab: '../build/app/outputs/bundle/release/app-release.aab',
     )
   end
end

Then also it says somewhere, that :

[11:16:18]: Couldn't find any new signed apk files...

yet I provided the path to the aab.

Anyone who can quickly unblock me please

like image 418
Lutaaya Huzaifah Idris Avatar asked Jun 12 '20 08:06

Lutaaya Huzaifah Idris


1 Answers

desc "Deploy a new beta build to Google Play"
   lane :beta do
     build_number = number_of_commits()
     Dir.chdir "../.." do
       sh("flutter", "packages", "get")
       sh("flutter", "clean")
       sh("flutter", "build", "appbundle", "--build-number=#{build_number}")
     end
      upload_to_play_store(track: 'beta', aab: '../build/app/outputs/bundle/release/app-release.aab')
   end
like image 152
Altay Hunoğlu Avatar answered Sep 22 '22 20:09

Altay Hunoğlu