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

Build fails with the error - Could not find :tslocationmanager:. #580

Closed
id4coding opened this issue Dec 31, 2017 · 28 comments
Closed

Build fails with the error - Could not find :tslocationmanager:. #580

id4coding opened this issue Dec 31, 2017 · 28 comments

Comments

@id4coding
Copy link

Your Environment

  • Plugin version: 2.9.1

  • Platform: iOS or Android

  • OS version: Ubuntu 17.10

  • Device manufacturer / model:

  • Cordova version (cordova -v): 8.0.0

  • Cordova platform version (cordova platform ls):
    Installed platforms:
    android 7.0.0
    Available platforms:
    browser ~5.0.1
    ios ~4.5.4
    osx ~4.0.1
    windows ~5.0.0
    www ^3.12.0

  • Plugin config

Expected Behavior

Build should succeed / run to completion.

Actual Behavior

Build fails.

Steps to Reproduce

  1. ionic cordova run android --debug

Context

Trying to build an apk.

Debug logs

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find :tslocationmanager:.
  Searched in the following locations:
      file:/home/vivek/Android/Sdk/extras/m2repository//tslocationmanager//tslocationmanager-.pom
      file:/home/vivek/Android/Sdk/extras/m2repository//tslocationmanager//tslocationmanager-.aar
      file:/home/vivek/Android/Sdk/extras/google/m2repository//tslocationmanager//tslocationmanager-.pom
      file:/home/vivek/Android/Sdk/extras/google/m2repository//tslocationmanager//tslocationmanager-.aar
      file:/home/vivek/Android/Sdk/extras/android/m2repository//tslocationmanager//tslocationmanager-.pom
      file:/home/vivek/Android/Sdk/extras/android/m2repository//tslocationmanager//tslocationmanager-.aar
      https://jcenter.bintray.com//tslocationmanager//tslocationmanager-.pom
      https://jcenter.bintray.com//tslocationmanager//tslocationmanager-.aar
      https://maven.google.com//tslocationmanager//tslocationmanager-.pom
      https://maven.google.com//tslocationmanager//tslocationmanager-.aar
      https://repo1.maven.org/maven2//tslocationmanager//tslocationmanager-.pom
      https://repo1.maven.org/maven2//tslocationmanager//tslocationmanager-.aar
      file:/home/vivek/projects/challo-ng/platforms/android/app/src/android/libs/tslocationmanager-.aar
      file:/home/vivek/projects/challo-ng/platforms/android/app/src/android/libs/tslocationmanager.aar
  Required by:
      project :app

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org


BUILD FAILED
 in 27s
14 actionable tasks: 1 executed, 13 up-to-date
(node:12713) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /home/vivek/projects/challo-ng/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find :tslocationmanager:.
  Searched in the following locations:
      file:/home/vivek/Android/Sdk/extras/m2repository//tslocationmanager//tslocationmanager-.pom
      file:/home/vivek/Android/Sdk/extras/m2repository//tslocationmanager//tslocationmanager-.aar
      file:/home/vivek/Android/Sdk/extras/google/m2repository//tslocationmanager//tslocationmanager-.pom
      file:/home/vivek/Android/Sdk/extras/google/m2repository//tslocationmanager//tslocationmanager-.aar
      file:/home/vivek/Android/Sdk/extras/android/m2repository//tslocationmanager//tslocationmanager-.pom
      file:/home/vivek/Android/Sdk/extras/android/m2repository//tslocationmanager//tslocationmanager-.aar
      https://jcenter.bintray.com//tslocationmanager//tslocationmanager-.pom
      https://jcenter.bintray.com//tslocationmanager//tslocationmanager-.aar
      https://maven.google.com//tslocationmanager//tslocationmanager-.pom
      https://maven.google.com//tslocationmanager//tslocationmanager-.aar
      https://repo1.maven.org/maven2//tslocationmanager//tslocationmanager-.pom
      https://repo1.maven.org/maven2//tslocationmanager//tslocationmanager-.aar
      file:/home/vivek/projects/challo-ng/platforms/android/app/src/android/libs/tslocationmanager-.aar
      file:/home/vivek/projects/challo-ng/platforms/android/app/src/android/libs/tslocationmanager.aar
  Required by:
      project :app

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 27s
(node:12713) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@id4coding
Copy link
Author

Wanted to mention that I have one project with the plugin running successfully on the same Ubuntu box. But, when I try to create another ionic project with the background geolocation plugin, build fails.

@christocracy
Copy link
Member

christocracy commented Dec 31, 2017

The plugin isn’t ready for platform cordova-android@7.0.0. Few plugins are. The latest Android platform introduces breaking changes to plugin plugin.xml files.

@christocracy
Copy link
Member

christocracy commented Dec 31, 2017

You should use cordova 7.1.0 until this plugin is made ready for use with cordova-android@7.0.0.

For information about breaking changes with cordova-android@7.0.0 see here

@id4coding
Copy link
Author

I downgraded to platform android@~6.3.0 and build ran to completion. Thanks for pointing that out.

@christocracy
Copy link
Member

I was experimenting with cordova-android@7.0.0 before xmas. I know exactly what needs to be done. It will be supported soon.

@gmkohler
Copy link

gmkohler commented Jan 31, 2018

@christocracy Do you have any update on supporting cordova-android@7.0.0? I am running into this same error and am looking to upgrade to 7.0.0 to support some other plugins on the newer Android versions.

@christocracy
Copy link
Member

Keep your eye on the CHANGELOG.

I don’t see it for at least 2 weeks

@christocracy
Copy link
Member

You’re free to fork the plugin yourself and make the necessary changes.

@gmkohler
Copy link

Okay, I'm happy to give changing it on a fork a go. Regarding your previous comment:

I know exactly what needs to be done. It will be supported soon.

, what exactly needs to be done?

@christocracy
Copy link
Member

cordova-android 7.0

However this a major breaking change for people creating standalone Cordova Android projects. This also means that the locations of files have changed and have been brought in line to the structure used by Android Studio.
This may affect plugin.xml files and config.xml files that use edit-config, and make it so plugins that use edit-config will not be able to be compatible with both Android 6.x and Android 7.x. To fix this issue, please do the following in your XML files:

@christocracy
Copy link
Member

Anything referencing AndroidManifest in plugin.xml needs to change.

The target to tslocationmanager.aar probably needs to change as well.

@mvr-devs
Copy link

mvr-devs commented Feb 7, 2018

I am getting this issue as well... What is the mechanism to downgrade to android@~6.3.0 ?
Is it the Cordova CLI or something to change in the config.xml ?

@mvr-devs
Copy link

mvr-devs commented Feb 7, 2018

figured it out however the build started failing with errors about

transformclasseswithdexfordebug failed

So googled for that and changed the build.gradle to include the following in the android section:

defaultConfig { minSdkVersion 21 targetSdkVersion 26 multiDexEnabled true }

Which works but you have to edit the build.gradle after every remove/add platform...

@christocracy
Copy link
Member

Shouldn't need multiDexEnabled. Search here for targetSdkVersion

@mvr-devs
Copy link

mvr-devs commented Feb 7, 2018

I have this in config.xml

<preference name="android-targetSdkVersion" value="26" />

@nedpuganti
Copy link

nedpuganti commented Feb 8, 2018

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find :tsbackgroundfetch:.
  Searched in the following locations:
      file:/Users/inarenedpuganti/Library/Android/sdk/extras/m2repository//tsbackgroundfetch//tsbackgroundfetch-.pom
      file:/Users/inarenedpuganti/Library/Android/sdk/extras/m2repository//tsbackgroundfetch//tsbackgroundfetch-.aar
      file:/Users/inarenedpuganti/Library/Android/sdk/extras/google/m2repository//tsbackgroundfetch//tsbackgroundfetch-.pom
      file:/Users/inarenedpuganti/Library/Android/sdk/extras/google/m2repository//tsbackgroundfetch//tsbackgroundfetch-.aar
      file:/Users/inarenedpuganti/Library/Android/sdk/extras/android/m2repository//tsbackgroundfetch//tsbackgroundfetch-.pom
      file:/Users/inarenedpuganti/Library/Android/sdk/extras/android/m2repository//tsbackgroundfetch//tsbackgroundfetch-.aar
      https://jcenter.bintray.com//tsbackgroundfetch//tsbackgroundfetch-.pom
      https://jcenter.bintray.com//tsbackgroundfetch//tsbackgroundfetch-.aar
      https://maven.google.com//tsbackgroundfetch//tsbackgroundfetch-.pom
      https://maven.google.com//tsbackgroundfetch//tsbackgroundfetch-.aar
      https://repo1.maven.org/maven2//tsbackgroundfetch//tsbackgroundfetch-.pom
      https://repo1.maven.org/maven2//tsbackgroundfetch//tsbackgroundfetch-.aar
      file:/Users/inarenedpuganti/Documents/trunow/trunow_mobile_ionic/platforms/android/app/src/android/libs/tsbackgroundfetch-.aar
      file:/Users/inarenedpuganti/Documents/trunow/trunow_mobile_ionic/platforms/android/app/src/android/libs/tsbackgroundfetch.aar
      file:/Users/inarenedpuganti/Documents/trunow/trunow_mobile_ionic/platforms/android/app/libs/tsbackgroundfetch-.aar
      file:/Users/inarenedpuganti/Documents/trunow/trunow_mobile_ionic/platforms/android/app/libs/tsbackgroundfetch.aar
  Required by:
      project :app
> Could not find :tslocationmanager:.
  Searched in the following locations:
      file:/Users/inarenedpuganti/Library/Android/sdk/extras/m2repository//tslocationmanager//tslocationmanager-.pom
      file:/Users/inarenedpuganti/Library/Android/sdk/extras/m2repository//tslocationmanager//tslocationmanager-.aar
      file:/Users/inarenedpuganti/Library/Android/sdk/extras/google/m2repository//tslocationmanager//tslocationmanager-.pom
      file:/Users/inarenedpuganti/Library/Android/sdk/extras/google/m2repository//tslocationmanager//tslocationmanager-.aar
      file:/Users/inarenedpuganti/Library/Android/sdk/extras/android/m2repository//tslocationmanager//tslocationmanager-.pom
      file:/Users/inarenedpuganti/Library/Android/sdk/extras/android/m2repository//tslocationmanager//tslocationmanager-.aar
      https://jcenter.bintray.com//tslocationmanager//tslocationmanager-.pom
      https://jcenter.bintray.com//tslocationmanager//tslocationmanager-.aar
      https://maven.google.com//tslocationmanager//tslocationmanager-.pom
      https://maven.google.com//tslocationmanager//tslocationmanager-.aar
      https://repo1.maven.org/maven2//tslocationmanager//tslocationmanager-.pom
      https://repo1.maven.org/maven2//tslocationmanager//tslocationmanager-.aar
      file:/Users/inarenedpuganti/Documents/trunow/trunow_mobile_ionic/platforms/android/app/src/android/libs/tslocationmanager-.aar
      file:/Users/inarenedpuganti/Documents/trunow/trunow_mobile_ionic/platforms/android/app/src/android/libs/tslocationmanager.aar
      file:/Users/inarenedpuganti/Documents/trunow/trunow_mobile_ionic/platforms/android/app/libs/tslocationmanager-.aar
      file:/Users/inarenedpuganti/Documents/trunow/trunow_mobile_ionic/platforms/android/app/libs/tslocationmanager.aar
  Required by:
      project :app

@christocracy
Copy link
Member

You're using Cordova 8. The plugin isn't ready. Use 7.x

@christocracy
Copy link
Member

As noted right up there

@keerthivasan12
Copy link

i am having same problem
BUILD FAILED in 24s
11 actionable tasks: 11 executed
Error: /home/developer/Documents/myNewProject/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
Could not find :tsbackgroundfetch:.
Searched in the following locations:
file:/home/developer/Android/Sdk/extras/m2repository//tsbackgroundfetch//tsbackgroundfetch-.pom
file:/home/developer/Android/Sdk/extras/m2repository//tsbackgroundfetch//tsbackgroundfetch-.aar
file:/home/developer/Android/Sdk/extras/google/m2repository//tsbackgroundfetch//tsbackgroundfetch-.pom
file:/home/developer/Android/Sdk/extras/google/m2repository//tsbackgroundfetch//tsbackgroundfetch-.aar
file:/home/developer/Android/Sdk/extras/android/m2repository//tsbackgroundfetch//tsbackgroundfetch-.pom
file:/home/developer/Android/Sdk/extras/android/m2repository//tsbackgroundfetch//tsbackgroundfetch-.aar
https://jcenter.bintray.com//tsbackgroundfetch//tsbackgroundfetch-.pom
https://jcenter.bintray.com//tsbackgroundfetch//tsbackgroundfetch-.aar
https://maven.google.com//tsbackgroundfetch//tsbackgroundfetch-.pom
https://maven.google.com//tsbackgroundfetch//tsbackgroundfetch-.aar
https://repo1.maven.org/maven2//tsbackgroundfetch//tsbackgroundfetch-.pom
https://repo1.maven.org/maven2//tsbackgroundfetch//tsbackgroundfetch-.aar
file:/home/developer/Documents/myNewProject/platforms/android/app/src/android/libs/tsbackgroundfetch-.aar
file:/home/developer/Documents/myNewProject/platforms/android/app/src/android/libs/tsbackgroundfetch.aar
Required by:
project :app
Could not find :tslocationmanager:.
Searched in the following locations:
file:/home/developer/Android/Sdk/extras/m2repository//tslocationmanager//tslocationmanager-.pom
file:/home/developer/Android/Sdk/extras/m2repository//tslocationmanager//tslocationmanager-.aar
file:/home/developer/Android/Sdk/extras/google/m2repository//tslocationmanager//tslocationmanager-.pom
file:/home/developer/Android/Sdk/extras/google/m2repository//tslocationmanager//tslocationmanager-.aar
file:/home/developer/Android/Sdk/extras/android/m2repository//tslocationmanager//tslocationmanager-.pom
file:/home/developer/Android/Sdk/extras/android/m2repository//tslocationmanager//tslocationmanager-.aar
https://jcenter.bintray.com//tslocationmanager//tslocationmanager-.pom
https://jcenter.bintray.com//tslocationmanager//tslocationmanager-.aar
https://maven.google.com//tslocationmanager//tslocationmanager-.pom
https://maven.google.com//tslocationmanager//tslocationmanager-.aar
https://repo1.maven.org/maven2//tslocationmanager//tslocationmanager-.pom
https://repo1.maven.org/maven2//tslocationmanager//tslocationmanager-.aar
file:/home/developer/Documents/myNewProject/platforms/android/app/src/android/libs/tslocationmanager-.aar
file:/home/developer/Documents/myNewProject/platforms/android/app/src/android/libs/tslocationmanager.aar
Required by:
project :app

@keerthivasan12
Copy link

global packages:

cordova (Cordova CLI) : 7.1.0
local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.1.0
Ionic Framework : ionic-angular 3.9.2

@christocracy
Copy link
Member

christocracy commented Mar 2, 2018

@keerthivasan12 You cannot use cordova-android >= 6.x currently.

@bollatialfredo
Copy link

Start a new project with Ionic, add Android platform, add plugin cordova plugin add cordova-background-geolocation-lt and run command ionic cordova run android and fails:

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not resolve all files for configuration ':app:debugCompileClasspath'.

Could not find :tsbackgroundfetch:.

Ionic info:

cli packages: (/usr/lib/node_modules)

@ionic/cli-utils  : 1.15.1
ionic (Ionic CLI) : 3.15.1

global packages:

cordova (Cordova CLI) : 8.0.0 

local packages:

@ionic/app-scripts : 3.1.0
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v8.2.1
npm               : 5.3.0 
OS                : Linux 4.13

Environment Variables:

ANDROID_HOME : /home/alfredo/Android/Sdk

Misc:

backend : legacy

@christocracy
Copy link
Member

The answer is right up there:
#580 (comment)

@bollatialfredo
Copy link

bollatialfredo commented Apr 13, 2018

Which version of cordova-android will work with the plugin? I got this now:

Unmet project requirements for latest version of cordova-background-geolocation-lt:
cordova-android (5.2.2 in project, >=6.3.0 required)
Current project does not satisfy the engine requirements specified by any version of cordova-background-geolocation-lt. Fetching latest version of plugin anyway (may be incompatible)

@christocracy
Copy link
Member

  • Cordova >= 7.1.0 is required
  • cordova-android@6.4.0

If you're using Cordova 8:

$ cordova platform add android@6.4.0

@bollatialfredo
Copy link

@christocracy any estimate to offer support for Android 7.0.0?

@christocracy
Copy link
Member

When other major plugins, such as PhoneGap-plugin-push start supporting it.

@steveetm
Copy link

Phonegap-plugin-push supports it since 2.2

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

8 participants