Gradle fails to find any remote libraries - java
I'm using Android Studio 1.0.1 and Gradle 2.2.1, and Gradle can not download any libraries from jcenter or maven central. I specifically need joda time and expandable text view, but it seems that no matter what dependency I add, Gradle refuses to find it. Here's my build.gradle files:
Project build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
Module build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.1"
repositories {
jcenter()
}
defaultConfig {
applicationId "org.testOrg"
minSdkVersion 16
targetSdkVersion 21
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
packagingOptions{
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile project(':appmsglibrary')
compile project(':library')
compile project(':authenticationActivity')
compile project(':slidinguppanellibrary')
compile 'com.android.support:support-v4:21+'
compile 'com.google.android.gms:play-services:6.1.71+'
compile 'com.android.support:appcompat-v7:21+'
compile files('libs/HockeySDK-3.0.2.jar')
compile files('libs/jackson-annotations-2.4.0.jar')
compile files('libs/jackson-core-2.4.2.jar')
compile files('libs/jackson-databind-2.4.2.jar')
compile files('libs/picasso-2.3.4.jar')
compile files('libs/joda-time-2.4.jar')
compile 'com.squareup.picasso:picasso:2.3.2'
}
If I go into the project settings and add dependencies through the GUI, I can search for each one of these so I know that gradle knows they exist at that point. But no matter what I've tried, it always fails to sync when I have a remote library added as a dependency. Any thoughts on how to go about fixing this? I've tried uninstalling everything (Android Studio, Gradle, SDKs and tools, etc) but still have the same issue. My colleague is working on the same code base and gradle syncs just fine for him.
Result of running gradle from the command line
I ran this command from the project root ./gradlew --stacktrace --debug
18:00:47.862 [ERROR] [org.gradle.BuildExceptionReporter]
18:00:47.865 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
18:00:47.867 [ERROR] [org.gradle.BuildExceptionReporter]
18:00:47.868 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
18:00:47.869 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred configuring root project 'App-Studio'.
18:00:47.870 [ERROR] [org.gradle.BuildExceptionReporter] > Could not resolve all dependencies for configuration ':classpath'.
18:00:47.871 [ERROR] [org.gradle.BuildExceptionReporter] > Could not resolve com.android.tools.build:gradle:1.0.0.
18:00:47.872 [ERROR] [org.gradle.BuildExceptionReporter] Required by:
18:00:47.872 [ERROR] [org.gradle.BuildExceptionReporter] :App-Studio:unspecified
18:00:47.873 [ERROR] [org.gradle.BuildExceptionReporter] > org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
18:00:47.874 [ERROR] [org.gradle.BuildExceptionReporter]
18:00:47.876 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
18:00:47.878 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'App-Studio'.
18:00:47.878 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:91)
18:00:47.879 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:61)
18:00:47.880 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:504)
18:00:47.881 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:83)
18:00:47.882 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:42)
18:00:47.882 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
18:00:47.884 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:129)
18:00:47.885 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
18:00:47.886 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
18:00:47.887 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
18:00:47.888 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
18:00:47.889 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
18:00:47.890 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
18:00:47.891 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
18:00:47.892 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
18:00:47.893 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
18:00:47.894 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
18:00:47.895 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
18:00:47.896 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
18:00:47.897 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
18:00:47.898 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
18:00:47.899 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
18:00:47.900 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
18:00:47.901 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
18:00:47.902 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:33)
18:00:47.902 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
18:00:47.903 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
18:00:47.904 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
18:00:47.905 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
18:00:47.905 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
18:00:47.906 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
18:00:47.906 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
18:00:47.907 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':classpath'.
18:00:47.907 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.rethrowFailure(DefaultLenientConfiguration.java:52)
18:00:47.908 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.rethrowFailure(DefaultResolvedConfiguration.java:36)
18:00:47.909 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$FilesAggregatingResolvedConfiguration.rethrowFailure(SelfResolvingDependencyResolver.java:110)
18:00:47.909 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver$ErrorHandlingResolvedConfiguration.rethrowFailure(ErrorHandlingArtifactDependencyResolver.java:180)
18:00:47.910 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:444)
18:00:47.910 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:205)
18:00:47.911 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(Unknown Source)
18:00:47.912 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.defineScriptHandlerClassScope(DefaultPluginRequestApplicator.java:142)
18:00:47.912 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPlugins(DefaultPluginRequestApplicator.java:60)
18:00:47.913 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:131)
18:00:47.913 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:39)
18:00:47.914 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
18:00:47.914 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
18:00:47.915 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:59)
18:00:47.916 [ERROR] [org.gradle.BuildExceptionReporter] ... 30 more
18:00:47.917 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.android.tools.build:gradle:1.0.0.
18:00:47.918 [ERROR] [org.gradle.BuildExceptionReporter] Required by:
18:00:47.919 [ERROR] [org.gradle.BuildExceptionReporter] :App-Studio:unspecified
18:00:47.920 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver.resolve(RepositoryChainDependencyResolver.java:81)
18:00:47.921 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainAdapter.resolve(RepositoryChainAdapter.java:69)
18:00:47.921 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.clientmodule.ClientModuleResolver.resolve(ClientModuleResolver.java:44)
18:00:47.922 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$ModuleVersionResolveState.resolve(DependencyGraphBuilder.java:577)
18:00:47.922 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$ModuleVersionResolveState.getMetaData(DependencyGraphBuilder.java:587)
18:00:47.923 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$DependencyEdge.calculateTargetConfigurations(DependencyGraphBuilder.java:272)
18:00:47.923 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$DependencyEdge.attachToTargetConfigurations(DependencyGraphBuilder.java:246)
18:00:47.924 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:156)
18:00:47.925 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder.resolveDependencyGraph(DependencyGraphBuilder.java:94)
18:00:47.925 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder.resolve(DependencyGraphBuilder.java:84)
18:00:47.926 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver$1.execute(DefaultDependencyResolver.java:122)
18:00:47.926 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver$1.execute(DefaultDependencyResolver.java:88)
18:00:47.927 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Transformers$4.transform(Transformers.java:136)
18:00:47.928 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:61)
18:00:47.928 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:39)
18:00:47.929 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver.resolve(DefaultDependencyResolver.java:88)
18:00:47.929 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.run(CacheLockingArtifactDependencyResolver.java:42)
18:00:47.930 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22)
18:00:47.930 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:187)
18:00:47.931 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
18:00:47.932 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
18:00:47.932 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187)
18:00:47.933 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:64)
18:00:47.933 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:40)
18:00:47.934 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver.resolve(SelfResolvingDependencyResolver.java:45)
18:00:47.934 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ShortcircuitEmptyConfigsArtifactDependencyResolver.resolve(ShortcircuitEmptyConfigsArtifactDependencyResolver.java:55)
18:00:47.935 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.resolve(ErrorHandlingArtifactDependencyResolver.java:47)
18:00:47.935 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver.resolve(DefaultConfigurationResolver.java:46)
18:00:47.936 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveNow(DefaultConfiguration.java:250)
18:00:47.937 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:240)
18:00:47.937 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source)
18:00:47.938 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:442)
18:00:47.938 [ERROR] [org.gradle.BuildExceptionReporter] ... 39 more
18:00:47.939 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
18:00:47.939 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
18:00:47.940 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.conn.PoolingClientConnectionManager.requestConnection(PoolingClientConnectionManager.java:186)
18:00:47.940 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447)
18:00:47.941 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
18:00:47.941 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:137)
18:00:47.942 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:118)
18:00:47.942 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.http.HttpClientHelper.performHttpRequest(HttpClientHelper.java:111)
18:00:47.943 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.http.HttpClientHelper.executeGetOrHead(HttpClientHelper.java:87)
18:00:47.944 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.http.HttpClientHelper.performRequest(HttpClientHelper.java:78)
18:00:47.944 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.http.HttpClientHelper.performRawGet(HttpClientHelper.java:66)
18:00:47.945 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.http.HttpClientHelper.performGet(HttpClientHelper.java:70)
18:00:47.945 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.http.HttpResourceAccessor.getResource(HttpResourceAccessor.java:53)
18:00:47.946 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.http.HttpResourceAccessor.getResource(HttpResourceAccessor.java:36)
18:00:47.946 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transfer.ProgressLoggingExternalResourceAccessor.getResource(ProgressLoggingExternalResourceAccessor.java:39)
18:00:47.947 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.getResource(DefaultCacheAwareExternalResourceAccessor.java:72)
18:00:47.948 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.downloadStaticResource(DefaultExternalResourceArtifactResolver.java:91)
18:00:47.948 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.resolveMetaDataArtifact(DefaultExternalResourceArtifactResolver.java:57)
18:00:47.949 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.parseMetaDataFromArtifact(ExternalResourceResolver.java:162)
18:00:47.949 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.resolveStaticDependency(ExternalResourceResolver.java:141)
18:00:47.950 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver.doResolveComponentMetaData(MavenResolver.java:82)
18:00:47.950 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$RemoteRepositoryAccess.resolveComponentMetaData(ExternalResourceResolver.java:391)
18:00:47.951 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockReleasingModuleComponentsRepository$LockReleasingRepositoryAccess$2.run(CacheLockReleasingModuleComponentsRepository.java:65)
18:00:47.951 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22)
18:00:47.952 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:237)
18:00:47.952 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:308)
18:00:47.953 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:114)
18:00:47.953 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.longRunningOperation(DefaultCacheFactory.java:179)
18:00:47.954 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.longRunningOperation(DefaultCacheLockingManager.java:56)
18:00:47.954 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockReleasingModuleComponentsRepository$LockReleasingRepositoryAccess.resolveComponentMetaData(CacheLockReleasingModuleComponentsRepository.java:63)
18:00:47.955 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository$ResolveAndCacheRepositoryAccess.resolveComponentMetaData(CachingModuleComponentRepository.java:284)
18:00:47.956 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.BaseModuleComponentRepositoryAccess.resolveComponentMetaData(BaseModuleComponentRepositoryAccess.java:38)
18:00:47.956 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryCachedModuleComponentRepository$CachedAccess.resolveComponentMetaData(InMemoryCachedModuleComponentRepository.java:70)
18:00:47.957 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentMetaDataResolveState.process(ComponentMetaDataResolveState.java:70)
18:00:47.957 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentMetaDataResolveState.resolve(ComponentMetaDataResolveState.java:62)
18:00:47.958 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver.findBestMatch(RepositoryChainDependencyResolver.java:114)
18:00:47.958 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver.findBestMatch(RepositoryChainDependencyResolver.java:97)
18:00:47.959 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver.resolve(RepositoryChainDependencyResolver.java:70)
18:00:47.959 [ERROR] [org.gradle.BuildExceptionReporter] ... 70 more
18:00:47.960 [ERROR] [org.gradle.BuildExceptionReporter]
18:00:47.960 [LIFECYCLE] [org.gradle.BuildResultLogger]
18:00:47.961 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
18:00:47.962 [LIFECYCLE] [org.gradle.BuildResultLogger]
18:00:47.962 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 2.372 secs
I had a similar problem and was caused by the gradle proxy settings
If you are using proxy settings, make sure that you have the HTTPS proxy set.
Looks like you are not using the Dependency with Classifier in your dependencies as described in section 51.4.1.3. Classifiers.
Specifically
compile files('libs/joda-time-2.4.jar')
for joda time.
Also gradle please is a nice place to find the latest version and format for most gradle dependencies, such as jodatime http://gradleplease.appspot.com/#jodatime.
Related
cassandra datastax Unexpected error while writing generated code: java.lang.NullPointerException
I have a java class import com.datastax.oss.driver.api.mapper.annotations.Dao; import com.datastax.oss.driver.api.mapper.annotations.Delete; import com.datastax.oss.driver.api.mapper.annotations.Insert; import com.datastax.oss.driver.api.mapper.annotations.Select; #Dao public interface ProductDao { #Select Product findById(UUID productId); #Insert void save(Product product); #Delete void delete(Product product); } For which I would like to use for cassandra record fetching. I was trying the doc - https://github.com/datastax/java-driver/tree/4.x/manual/mapper when I try building it with maven I get an NPE ProductDao.java:[10,8] Unexpected error while writing generated code: java.lang.NullPointerException [ERROR] at com.datastax.oss.driver.internal.mapper.processor.util.HierarchyScanner.traverseHierarchy(HierarchyScanner.java:169) [ERROR] at com.datastax.oss.driver.internal.mapper.processor.util.HierarchyScanner.resolveHierarchyScanStrategy(HierarchyScanner.java:97) [ERROR] at com.datastax.oss.driver.internal.mapper.processor.util.HierarchyScanner.resolveTypeHierarchy(HierarchyScanner.java:81) [ERROR] at com.datastax.oss.driver.internal.mapper.processor.entity.DefaultEntityFactory.getDefinition(DefaultEntityFactory.java:80) [ERROR] at com.datastax.oss.driver.internal.mapper.processor.dao.DaoSelectMethodGenerator.generate(DaoSelectMethodGenerator.java:98) [ERROR] at java.util.Optional.flatMap(Optional.java:241) [ERROR] at com.datastax.oss.driver.internal.mapper.processor.dao.DaoImplementationGenerator.getContents(DaoImplementationGenerator.java:331) [ERROR] at com.datastax.oss.driver.internal.mapper.processor.SingleFileCodeGenerator.generate(SingleFileCodeGenerator.java:43) [ERROR] at com.datastax.oss.driver.internal.mapper.processor.MapperProcessor.processAnnotatedTypes(MapperProcessor.java:125) [ERROR] at com.datastax.oss.driver.internal.mapper.processor.MapperProcessor.process(MapperProcessor.java:90) [ERROR] at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:802) [ERROR] at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:713) [ERROR] at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91) [ERROR] at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1043) [ERROR] at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1184) [ERROR] at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170) [ERROR] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856) [ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:523) [ERROR] at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129) [ERROR] at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138) [ERROR] at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126) [ERROR] at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:174) [ERROR] at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:943) [ERROR] at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:137) [ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) [ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192) [ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105) [ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957) [ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289) [ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:193) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.lang.reflect.Method.invoke(Method.java:498) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347) Not able to root cause the error, any help is apprecitated.
This line in the stack trace and upwards starting from - [ERROR] at com.datastax.oss.driver.internal.mapper.processor.entity.DefaultEntityFactory.getDefinition(DefaultEntityFactory.java:80) Indicated to me that it was an issue on the entity class, not the Dao itself. With that in mind, I could replicate this stack trace by removing the #Entity annotation on the class that the Dao was to return, in your case that would be Product. My expectation is that the Product class is not annotated correctly, we would need the code added from that class to further diagnose / confirm.
Unresolved Reference when use Java Constants
When i tried to build, ide throw error: "Unresolved reference: X " X is any Java constant (public static final) on (public) class Java Can’t use: android.os.Environment.DIRECTORY_DOCUMENTS Build.VERSION_CODES.M Etc I have tried: Invalidate Cache in Android Studio gradlew cleanBuildCache Clean / Rebuild Clone project on other folder, Etc It’s a mixed project, Java & Kotlin I can use static methods, like: public static Uri getUriForFile from public class FileProvider Etc Error line: 10:38:23.053 [ERROR] [org.gradle.api.Task] e: C:\Users\User\AndroidStudioProjects\MyAndroidProject\app\src\main\kotlin\com\myapp\mypackage\android\PermissionsHelper.kt: (67, 66): Unresolved reference: M I’m using: Gradle Configuration ext.kotlin_version = ‘1.3.10’ classpath ‘com.android.tools.build:gradle:3.2.1’ androidExtensions { experimental = true } Software Windows 10 Pro 10.0.17134 N/D Compilation 17134 x64 Android Studio 3.2.1 Build #Al-181-5540.7.32.5056338,build on Octubre 8, 2018 java version “1.8.0_162” Java™ SE Runtime Environment (build 1.8.0_162-b12) Java HotSpot™ 64-Bit Server VM (build 25.162-b12, mixed mode) Stacktrace: 10:38:23.076 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception. 10:38:23.076 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 10:38:23.076 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong: 10:38:23.076 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:compileDebugKotlin'. 10:38:23.076 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Compilation error. See log for more details 10:38:23.076 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 10:38:23.076 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try: 10:38:23.076 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --scan to get full insights. 10:38:23.076 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 10:38:23.076 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Exception is: 10:38:23.077 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileDebugKotlin'. 10:38:23.077 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103) 10:38:23.077 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73) 10:38:23.077 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51) 10:38:23.077 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipCachedTaskExecuter.execute(SkipCachedTaskExecuter.java:103) 10:38:23.077 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59) 10:38:23.077 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) 10:38:23.077 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ResolveBuildCacheKeyExecuter.execute(ResolveBuildCacheKeyExecuter.java:66) 10:38:23.077 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59) 10:38:23.077 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101) 10:38:23.077 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter
Thank you #yole and #Rod_Algonquin for the help, meanwhile i was writing the questions, and answering the questions, the Rubber duck method help me, the IDE was throwing me a error "Unresolved reference", but the problem was the annotation: #RequiresApi(Build.VERSION_CODES.M) Because: minSdkVersion 16 I was working on PermissionsHelper.kt, I was using Activity instead of android.support.v4.app.Fragment or ContextCompat for old versions. Sorry guys for not post the code, and the complete gradle, i wanted to do a short post, this is my fist post. Thank yo for all the help.
Building my app but it say build failed with one error
I am new to android studio and building my app but it say build failed with one error plz help 13:25:49.885 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 13:25:49.885 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception. 13:25:49.885 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 13:25:49.885 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Where: 13:25:49.885 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Build file 'C:\Users\user\AndroidStudioProjects\Happybirthday1\build.gradle' line: 32 13:25:49.885 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 13:25:49.885 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong: 13:25:49.885 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Could not compile build file 'C:\Users\user\AndroidStudioProjects\Happybirthday1\build.gradle'. 13:25:49.885 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > startup failed: 13:25:49.885 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] build file 'C:\Users\user\AndroidStudioProjects\Happybirthday1\build.gradle': 32: expecting '}', found '' # line 32, column 1. 13:25:49.900 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 1 error 13:25:49.900 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 13:25:49.900 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 13:25:49.900 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try: 13:25:49.900 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. 13:25:49.900 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 13:25:49.900 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org 13:25:49.900 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] 13:25:49.900 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 1s
I believe you just missed a '}' in build.gradle file. Should be quite straightforward to fix.
Missed "}" in the code build file 'C:\Users\user\AndroidStudioProjects\Happybirthday1\build.gradle': 32: expecting '}', found '' # line 32, column 1.
Execution failed for task ':app:compileRetrolambdaDebug'
I use retrolambda a long time, but suddenly he stopped working in all my projects. I reinstalled jdk, but it didn't help. I didn't find answer in google, i hope you can help me. My gradle files: build.gradle (app): apply plugin: 'com.android.application' apply plugin: 'me.tatarka.retrolambda' android { compileSdkVersion 25 buildToolsVersion "25.0.1" defaultConfig { applicationId "xsystem.ru.test" minSdkVersion 16 targetSdkVersion 25 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:25.1.0' } build.gradle (Project): // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' classpath 'me.tatarka:gradle-retrolambda:3.2.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } Gradle stacktrace: 19:32:51.295 [ERROR] [org.gradle.BuildExceptionReporter] 19:32:51.295 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':app:compileRetrolambdaDebug'. 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] > Process 'command 'C:\Program Files\Java\jdk1.8.0_121\bin\java.exe'' finished with non-zero exit value -1073740791 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is: 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileRetrolambdaDebug'. 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_121\bin\java.exe'' finished with non-zero exit value -1073740791 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:367) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:31) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.file.DefaultFileOperations.javaexec(DefaultFileOperations.java:170) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.javaexec(AbstractProject.java:848) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.javaexec(AbstractProject.java:844) 19:32:51.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.Project$javaexec$11.call(Unknown Source) 19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at me.tatarka.RetrolambdaTask.execute(RetrolambdaTask.groovy:69) 19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75) 19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245) 19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221) 19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:232) 19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210) 19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) 19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) 19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter] ... 14 more 19:32:51.297 [ERROR] [org.gradle.BuildExceptionReporter]
Update class path to classpath 'me.tatarka:gradle-retrolambda:3.2.5' then add this to your dependencies retrolambdaConfig 'net.orfjackal.retrolambda:retrolambda:2.3.0' Add following code to application block compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } After this it should work. Update: The latest version of retrolambda till today (September 11 2017) is 3.7.0
Add this in app gradle build file before android block (on top) //noinspection GradleCompatible apply plugin: 'com.android.application' apply plugin: 'me.tatarka.retrolambda' tasks.whenTaskAdded { task -> if (task.name.startsWith("lint")) { task.enabled = false } } retrolambda { jvmArgs '-noverify' } and I also changed my class path version from 3.4.0 to 3.2.5 and my issue resolved. Also no need to add retroLambdaConfig
When I updated the AS project to AS 3.4.1, there were a lot of problems, and I finally got stuck on this error message. There was very little related information on the Internet, let alone the solution. In desperation, I looked at other warnings. The following warning was changed casually: One of the plugins you are using supports Java 8 language features. To try the support built into the Android plugin, remove the following from your build.gradle The solution is to remove the previously dependent lambda library, because after version 3.0, AS itself supports lambda apply plugin: 'me.tatarka.retrolambda' //remove this line dependencies { classpath 'com.android.tools.build:gradle:3.4.1' classpath 'me.tatarka:gradle-retrolambda:3.2.4' //remote this line } After removing this sentence, synchronize it, and miraculously compiled successfully. It seems that this plug-in library does not exist after version 3.0, and it cannot be recognized.
gradle compile success, but fail to run project
PROBLEM After I try to find out what is root cause of problem. why I can build successfully but unable to run project. It's because one jar file call 'signalr-client-sdk.jar' if I put in libs folder and run the following error message generated. please help me to identify it. I don't know what to do now. FILE JAR DOWNLOAD ENVIRONMENT IntelliJ Idea 14.1.5 Java JDK 1.7.0_79 gardle wrapper - gradle-2.2.1-all.zip Latest Android SDK was updated GRADLE FILE buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.1.1' } } apply plugin: 'com.android.application' repositories { jcenter() } android { compileSdkVersion 23 buildToolsVersion "23.0.1" defaultConfig { applicationId "com.testsinalr.app" minSdkVersion 16 targetSdkVersion 23 versionCode 1 versionName "1.0" } compileOptions { sourceCompatibility JavaVersion.VERSION_1_6 targetCompatibility JavaVersion.VERSION_1_6 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.1.0' } ERROR LOG Error:Gradle: 16:08:25.422 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"SIMPLE","text":"UNEXPECTED TOP-LEVEL EXCEPTION:","position":{},"original":"UNEXPECTED TOP-LEVEL EXCEPTION:"} AGPBI: {"kind":"SIMPLE","text":"java.lang.RuntimeException: Exception parsing classes","position":{},"original":"java.lang.RuntimeException: Exception parsing classes"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.processClass(Main.java:752)","position":{},"original":"\tat com.android.dx.command.dexer.Main.processClass(Main.java:752)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.processFileBytes(Main.java:718)","position":{},"original":"\tat com.android.dx.command.dexer.Main.processFileBytes(Main.java:718)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.access$1200(Main.java:85)","position":{},"original":"\tat com.android.dx.command.dexer.Main.access$1200(Main.java:85)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1645)","position":{},"original":"\tat com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1645)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)","position":{},"original":"\tat com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)","position":{},"original":"\tat com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)","position":{},"original":"\tat com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.processOne(Main.java:672)","position":{},"original":"\tat com.android.dx.command.dexer.Main.processOne(Main.java:672)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)","position":{},"original":"\tat com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)","position":{},"original":"\tat com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.run(Main.java:277)","position":{},"original":"\tat com.android.dx.command.dexer.Main.run(Main.java:277)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.main(Main.java:245)","position":{},"original":"\tat com.android.dx.command.dexer.Main.main(Main.java:245)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.Main.main(Main.java:106)","position":{},"original":"\tat com.android.dx.command.Main.main(Main.java:106)"} AGPBI: {"kind":"SIMPLE","text":"Caused by: com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)","position":{},"original":"Caused by: com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)","position":{},"original":"\tat com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)","position":{},"original":"\tat com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)","position":{},"original":"\tat com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)","position":{},"original":"\tat com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.parseClass(Main.java:764)","position":{},"original":"\tat com.android.dx.command.dexer.Main.parseClass(Main.java:764)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.access$1500(Main.java:85)","position":{},"original":"\tat com.android.dx.command.dexer.Main.access$1500(Main.java:85)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684)","position":{},"original":"\tat com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684)"} AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.processClass(Main.java:749)","position":{},"original":"\tat com.android.dx.command.dexer.Main.processClass(Main.java:749)"} AGPBI: {"kind":"SIMPLE","text":"\t... 12 more","position":{},"original":"\t... 12 more"} AGPBI: {"kind":"SIMPLE","text":"1 error; aborting","position":{},"original":"1 error; aborting"} 16:08:25.429 [ERROR] [org.gradle.BuildExceptionReporter] 16:08:25.430 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 16:08:25.430 [ERROR] [org.gradle.BuildExceptionReporter] 16:08:25.431 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 16:08:25.431 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':app:preDexDebug'. 16:08:25.432 [ERROR] [org.gradle.BuildExceptionReporter] > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 16:08:25.432 [ERROR] [org.gradle.BuildExceptionReporter] 16:08:25.433 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is: 16:08:25.434 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:preDexDebug'. 16:08:25.434 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) 16:08:25.434 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) 16:08:25.435 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) 16:08:25.435 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) 16:08:25.436 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) 16:08:25.436 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42) 16:08:25.437 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) 16:08:25.437 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) 16:08:25.438 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) 16:08:25.438 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305) 16:08:25.439 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79) 16:08:25.439 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63) 16:08:25.439 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51) 16:08:25.440 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23) 16:08:25.440 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88) 16:08:25.441 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29) 16:08:25.441 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) 16:08:25.442 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) 16:08:25.442 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68) 16:08:25.443 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) 16:08:25.443 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) 16:08:25.444 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55) 16:08:25.444 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149) 16:08:25.444 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106) 16:08:25.445 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86) 16:08:25.445 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80) 16:08:25.446 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:43) 16:08:25.446 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:30) 16:08:25.446 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.ConfiguringBuildAction.run(ConfiguringBuildAction.java:119) 16:08:25.447 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36) 16:08:25.448 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) 16:08:25.449 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:47) 16:08:25.449 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34) 16:08:25.450 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) 16:08:25.450 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:35) 16:08:25.450 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) 16:08:25.451 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24) 16:08:25.451 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) 16:08:25.452 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33) 16:08:25.452 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) 16:08:25.453 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:71) 16:08:25.453 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:69) 16:08:25.454 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.util.Swapper.swap(Swapper.java:38) 16:08:25.455 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:69) 16:08:25.455 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) 16:08:25.456 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60) 16:08:25.456 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34) 16:08:25.458 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) 16:08:25.460 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:70) 16:08:25.460 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34) 16:08:25.461 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) 16:08:25.463 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.DaemonHygieneAction.execute(DaemonHygieneAction.java:39) 16:08:25.463 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) 16:08:25.464 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:46) 16:08:25.464 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246) 16:08:25.467 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64) 16:08:25.470 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 16:08:25.474 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.ide.common.internal.WaitableExecutor.waitForTasksWithQuickFail(WaitableExecutor.java:116) 16:08:25.474 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.ide.common.internal.WaitableExecutor$waitForTasksWithQuickFail$0.call(Unknown Source) 16:08:25.477 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.tasks.PreDex.taskAction(PreDex.groovy:106) 16:08:25.478 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63) 16:08:25.480 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:235) 16:08:25.481 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211) 16:08:25.483 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:222) 16:08:25.483 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200) 16:08:25.486 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) 16:08:25.488 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) 16:08:25.489 [ERROR] [org.gradle.BuildExceptionReporter] ... 55 more 16:08:25.491 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 16:08:25.492 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:42) 16:08:25.493 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.core.AndroidBuilder.preDexLibrary(AndroidBuilder.java:1295) 16:08:25.493 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.internal.compiler.PreDexCache.preDexLibrary(PreDexCache.java:122) 16:08:25.495 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.core.AndroidBuilder.preDexLibrary(AndroidBuilder.java:1247) 16:08:25.495 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.core.AndroidBuilder$preDexLibrary$1.call(Unknown Source) 16:08:25.496 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.tasks.PreDex$PreDexTask.call(PreDex.groovy:150) 16:08:25.496 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.tasks.PreDex$PreDexTask.call(PreDex.groovy) 16:08:25.496 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 16:08:25.500 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:365) 16:08:25.501 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:40) 16:08:25.503 [ERROR] [org.gradle.BuildExceptionReporter] ... 6 more 16:08:25.504 [ERROR] [org.gradle.BuildExceptionReporter] Error:Could not execute build using Gradle installation '/Users/X-tivity/.gradle/wrapper/dists/gradle-2.2.1-all/c64ydeuardnfqctvr1gm30w53/gradle-2.2.1'.
Your real error is Caused by: com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000) This happens because your signalr-client-sdk.jar was compiled with Java 1.8: javap -verbose -classpath signalr-client-sdk.jar microsoft.aspnet.signalr.client.transport.HttpClientTransport | grep version minor version: 0 major version: 52 52 is Java 1.8. You should rebuild SignalR client with Java 1.7 (javap should return major version: 51).
Download the latest version of gradle Or you can use classpath 'com.android.tools.build:gradle:1.2.3' Then Rebuild and File --> Invalidate caches/restart For more information you can read this SO Answer Error: Gradle: execution failed for task ':app:preDexDebug' Edited Upgrade version sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7