nativescript-google-maps-sdk: Build error on Android with NS 4.1

NS Core project - using 4.1.

Getting the following error during build

`Unable to apply changes on device: emulator-5554. Error is: Failed to build plugin nativescript-google-maps-sdk : Error: Command ./gradlew failed with exit code 1 Error output:

FAILURE: Build failed with an exception.

  • What went wrong: Could not resolve all files for configuration ‘:releaseCompileClasspath’.

Could not find common.jar (android.arch.core:common:1.0.0). Searched in the following locations: https://jcenter.bintray.com/android/arch/core/common/1.0.0/common-1.0.0.jar

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

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

BUILD FAILED in 1s `

I created a new folder structure

./app/App_Resources/Android/src/main/res/values and added the xml file there with the api key.

In the above, I had the create the src/main/res/values folder - wasn’t there before.

I also added the meta entry to AndroidManifest.xml file.

The demo program seems to store the xml file in Android/src/main/assets folder - not sure which is correct.

Also getting this error message

No manifest found in /Users/asrock/Documents/test/app/App_Resources/Android/src/main/AndroidManifest.xml

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 46 (1 by maintainers)

Most upvoted comments

I can confirm the solution here worked.

https://github.com/NativeScript/android-runtime/issues/1081

Just made the change - removed and reinstalled the latest android.

Thanks.

I think patching the global build.gradle file is a working workaround, but I wouldn’t call it a solution. I followed up on android-runtime/issues/1081.

Updates, this finally worked!!, there are a couple of solutions that can be implemented

  1. as @dapriett said before -> https://github.com/NativeScript/android-runtime/issues/1081
  2. Wipe out all node_modules, npm cache and platforms, then npm install on application’s root directory to install everything again, then add the plugin again and then add the platform again, IT HAS TO BE IN THAT ORDER. Also the application was able to solve the missing jar but not sure how it did that because the resource: https://jcenter.bintray.com/android/arch/core/common/1.0.0/common-1.0.0.jar is permanently down, that resource doesn’t exist anymore, so there is still something missing around. I also followed the install instructions for NS < 4 no matter if my application was built on NS 4.0.1 Also my nodejs version is v8.11.2 and NPM 6.0.1 That’s it!!