Flutter – Could not find any matches for com.transistorsoft:tsbackgroundfetch:+ as no versions of com.transistorsoft:tsbackgroundfetch are available

huangapple go评论66阅读模式
英文:

Flutter - Could not find any matches for com.transistorsoft:tsbackgroundfetch:+ as no versions of com.transistorsoft:tsbackgroundfetch are available

问题

I use the above plugin to execute a task for every 15 minutes even after terminating the app. But after adding the above library, my app throws the error:

英文:

background_fetch: ^1.1.6

I use the above plugin to execute a task for every 15 minutes even after terminate the app. But after adding the above library my app throws the error

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find any matches for com.transistorsoft:tsbackgroundfetch:+ as no versions of com.transistorsoft:tsbackgroundfetch are available.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
       - https://jcenter.bintray.com/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
       - https://maven.google.com/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
       - https://storage.googleapis.com/download.flutter.io/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
       - file:/Users/rsoft/StudioProjects/salezrobot/android/app/libs/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
     Required by:
         project :app > project :background_fetch

Flutter – Could not find any matches for com.transistorsoft:tsbackgroundfetch:+ as no versions of com.transistorsoft:tsbackgroundfetch are available

答案1

得分: 5

将以下内容添加到 android/build.gradle 中:

maven {
   url "${project(':background_fetch').projectDir}/libs"
}

将其添加到 allprojects/repositories,而不是 buildscript/repositories

英文:

add this in android/build.gradle:

maven {
   url "${project(':background_fetch').projectDir}/libs"
}

to allprojects/repositories, NOT to the buildscript/repositories

答案2

得分: 0

你首先必须按照以下设置指南进行操作:

  1. IOS
  2. ANDROID
英文:

You first have to follow the setup below guides:

  1. IOS
  2. ANDROID

huangapple
  • 本文由 发表于 2023年5月22日 19:33:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/76305745.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定