How to fix build.gradle error in my nativescript app - android

I am using nativescript for my mobile app and when I run "tns run android", after a few minutes I receive the follow error:
Build file 'C:\Users\Michael\Desktop\nativescript-mobile-app\platforms\android\app\build.gradle' line: 598
A problem occurred configuring project ':app'.
Could not GET 'https://dl.bintray.com/triniwiz/maven/com/github/triniwiz/fancycamera/3.0.0-alpha16/fancycamera-3.0.0-alpha16.pom'. Received status code 403 from server: Forbidden
I would like to know how do I go about fixing it. This package is not in my package.json file

Related

Android studio 4.0 Could not resolve all artifacts for configuration ':classpath'.Received status code 403 from server: OK

I have installed Android studio in Mac when i try to create new project it is not building for Kotlin and Java both languages.
Bellow exception is for Java project.
Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'SampleJavaApp'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:80)
at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:73)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$600(LifecycleProjectEvaluator.java:53)
at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject$1.run(LifecycleProjectEvaluator.java:109)
at org.gradle.internal.Factories$1.create(Factories.java:26)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:189)
at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:40)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:238)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withMutableState(DefaultProjectStateRegistry.java:232)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withMutableState(DefaultProjectStateRegistry.java:193)
at
Bellow exception Kotlin
* What went wrong:
A problem occurred configuring root project 'SampleApplication'.
Could not resolve all artifacts for configuration ':classpath'.
Could not download kotlin-gradle-plugin-1.4.0.jar (org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.0/kotlin-gradle-plugin-1.4.0.jar'.
> Could not GET Received status code 403 from server: OK
Could not download tink-1.3.0-rc2.jar (com.google.crypto.tink:tink:1.3.0-rc2)
Received status code 403 from server: OK
Could not download protobuf-java-3.10.0.jar (com.google.protobuf:protobuf-java:3.10.0)
> Could not get resource 'https://jcenter.bintray.com/com/google/protobuf/protobuf-java/3.10.0/protobuf-java-3.10.0.jar'.
> Could not GET
from server: OK
Could not download kotlin-annotation-processing-gradle-1.4.0.jar (org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.4.0)
> Could not get resource
I have used proxy settings which are working fine i have downloaded one project it is working fine.I have try all available solutions in google and SO.

Could not GET api.bitbucket.org/1.0/repository. when building my react-native project for android

I got an old running project that when built shows dependency error.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApk'.
A problem occurred configuring project ':react-native-mqtt-iot'.
Could not resolve all dependencies for configuration ':react-native-mqtt-iot:_debugPublishCopy'.
Could not resolve co.ibhubs.ibchat:ibchat:0.0.1.
Required by:
project :react-native-mqtt-iot
Could not resolve co.ibhubs.ibchat:ibchat:0.0.1.
Could not get resource 'https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_awsiot/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom'.
Could not GET 'https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_awsiot/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom'. Received status code 410 from server: Gone
Could not resolve co.ibhubs.ibchat:ibchat:0.0.1.
Could not get resource 'https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_ibchat/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom'.
Could not GET 'https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_ibchat/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom'. Received status code 410 from server: Gone
Is it because of change of api version from 1.0 to 2.0? If so how to fix it?
Okay so I got the solution to fix.
In my case i change the url from https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_awsiot/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom
to
https://api.bitbucket.org/2.0/repositories/mumsnbabies/maven_awsiot/src/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom
And adding the following lines of code before the url:
authentication {
basic(BasicAuthentication)
}

Gradle error trying to run nativescript app on android emulator on mac

I'm trying to run a nativescript app on android using tns run android
I'm always getting gradle error:
FAILURE: Build failed with an exception.
* Where:
Build file:
'/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/bui
ld.gradle' line: 28
* What went wrong:
A problem occurred evaluating root project '`kinvey_nativescript_sdk`'.
> Failed to apply plugin [class 'org.gradle.api.plugins.BasePlugin']
> Could not create service of type OutputFilesRepository using ExecutionServices.createOutputFilesRepository().`
I tried the following:
Run ./gradlew --stacktrace but I got this error:
Caused by: org.gradle.cache.LockTimeoutException: Timeout waiting to lock
execution history cache
(/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/.gr
adle/5.1.1/executionHistory). It is currently in use by another Gradle
instance.
Owner PID: unknown
Our PID: 50331
Owner Operation: unknown
Our operation:
Lock file:
/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/.gra
dle/5.1.1/executionHistory/executionHistory.lock
Deleted .lock files manually and re-ran tns run android but I got the same error again
Run
chmod R+x/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk
Didn't fix the problem
The app runs fine on ios emulator and but not on android
I was having the same problem, looks to be related with this Gradle issue.
The workaround I found here is to move the project to the home folder (~).

Maximo Anywhere WorkManager build failed

I am try to build android apps but while creating apps my build failed with following errors.
D:\ibm\AnywhereWorkManager\build.xml:87: The following error occurred
while executing this line:
D:\ibm\AnywhereWorkManager\anywhere-apps-builder.xml:720: The
following error occurred while executing this line:
D:\ibm\AnywhereWorkManager\anywhere-apps-builder.xml:716: Failed
building application:
com.worklight.builder.exception.WorklightBuildException:
java.io.IOException: Unable to delete directory
D:\ibm\AnywhereWorkManager\apps\WorkApproval\android\native\assets\www\default\dojo\cldr\nls\zh-hans-mo.
at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
I know this answer might seem obvious, but if you have any of the files mentioned in the failure (D:\ibm\AnywhereWorkManager\apps\WorkApproval\android\native\assets\www\default\dojo\cldr\nls\zh-hans-mo)
open ( commandline, eclipse, other editor), this will cause the issue.

Gradle Error for Android Studio

I'm trying out Android Studio on OS X and am running into a mysterious error message. I went through the Google guide to building a simple UI, but when I finished writing the XML file and hit Run in the IDE, I get the following message ("Test2" is the name of the project):
Gradle: Execution failed for task ':Test2:validateDebugSigning'.
> Could not find matching constructor for: org.gradle.tooling.BuildException(java.lang.String)
I have never developed an android app before, so I don't know how common this is. I did a search for this error and found no one encountering the same problem.
I tried the solution from Abhan and I get a new error message:
Error: org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings
It warns you that android plug-in task validateDebugSigning cannot access the debug key. Check your accessibility to the debug.keystore.
On linux or OS X, the default location is ~/.android. On windows, it's in C:\Documents and Settings\.android\ or C:\Users\.android.

Categories

Resources