等待6个月后,将所有android studio,gradle和gradle插件更新到最新版本后,得到了我的ide的以下日志...
SO对此主题的回答并没有帮助解决我的问题。 有人可以帮忙吗?
一直到遍历android定期更新过程都是很痛苦的,错误/错误无处不在... -Pandroid.injected.studio.version = 3.1.3.0 -Pandroid.builder.sdkDownload = false --init-script C:\ Users \ asus \ AppData \ Local \ Temp \ ijinit.gradle 2018-07-29
02:47:24,210 [线程21]信息-.project.GradleProjectResolver- Gradle项目解决错误org.gradle.tooling.BuildException:可以 不使用Gradle分发运行构建操作 'https://services.gradle.org/distributions/gradle-4.4-all.zip'。在 org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:51) 在 org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29) ...由...引起:org.gradle.internal.exceptions.LocationAwareException: 配置项目':MyApp'时发生问题。在 org.gradle.initialization.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:74) ....由以下原因引起:org.gradle.api.ProjectConfigurationException:A 配置项目':MyApp'时出现问题。在 org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:94) ...由...引起:org.gradle.api.artifacts.ResolveException:无法 解析配置':MyApp:endpointsServer'的所有依赖项。 在 org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.wrapException(ErrorHandlingConfigurationResolver.java:96) 在 org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolveGraph(ErrorHandlingConfigurationResolver.java:68) 在 org.gradle.api.internal.artifacts.configurations.DefaultConfiguration $ 4.run(DefaultConfiguration.java:483) 在 org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) 在 org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) 在 org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) 在 org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) 在 org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveGraphIfRequired(DefaultConfiguration.java:474) 在 org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveToStateOrLater(DefaultConfiguration.java:459) 在 org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access $ 1700(DefaultConfiguration.java:116) 在 org.gradle.api.internal.artifacts.configurations.DefaultConfiguration $ ConfigurationFileCollection.getSelectedArtifacts(DefaultConfiguration.java:901) 在 org.gradle.api.internal.artifacts.configurations.DefaultConfiguration $ ConfigurationFileCollection.getFiles(DefaultConfiguration.java:889) 在 org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:404) 在 org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(未知 来源) com.google.cloud.tools.gradle.endpoints.framework.client.EndpointsClientPlugin $ 1 $ 1.execute(EndpointsClientPlugin.java:127) 在 com.google.cloud.tools.gradle.endpoints.framework.client.EndpointsClientPlugin $ 1 $ 1.execute(EndpointsClientPlugin.java:120) 在 org.gradle.internal.event.BroadcastDispatch $ ActionInvocationHandler.dispatch(BroadcastDispatch.java:91) 在 org.gradle.internal.event.BroadcastDispatch $ ActionInvocationHandler.dispatch(BroadcastDispatch.java:80) 在 org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42) 在 org.gradle.internal.event.BroadcastDispatch $ SingletonDispatch.dispatch(BroadcastDispatch.java:230) 在 org.gradle.internal.event.BroadcastDispatch $ SingletonDispatch.dispatch(BroadcastDispatch.java:149) 在 org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58) 在 org.gradle.internal.event.BroadcastDispatch $ CompositeDispatch.dispatch(BroadcastDispatch.java:324) 在 org.gradle.internal.event.BroadcastDispatch $ CompositeDispatch.dispatch(BroadcastDispatch.java:234) 在 org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140) 在 org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37) 在 org.gradle.internal.dispatch.ProxyDispatchAdapter $ DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) 在com.sun.proxy。$ Proxy27.afterEvaluate(未知来源)处 org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:76) ... 82更多原因: org.gradle.model.internal.core.ModelRuleExecutionException:异常 执行模型规则时抛出: PublishingPlugin.Rules#publishing(ExtensionContainer)在 org.gradle.model.internal.registry.DefaultModelRegistry.fireAction(DefaultModelRegistry.java:490) 在 org.gradle.model.internal.registry.DefaultModelRegistry.access $ 700(DefaultModelRegistry.java:71) ...更多原因:java.lang.NoClassDefFoundError: org / gradle / api / internal / component /用法
...另有132个原因:java.lang.ClassNotFoundException: org.gradle.api.internal.component。用法...还有177个2018-07-29 02:47:24,226 [线程21]警告-nal.AbstractExternalSystemTask- 原因:org.gradle.api.internal.component.Usage com.intellij.openapi.externalSystem.model.ExternalSystemException: 原因:org.gradle.api.internal.component.Usage ...原因: java.lang.ClassNotFoundException: org.gradle.api.internal.component。用法在 com.novoda.gradle.release.AndroidArtifacts.from(AndroidArtifacts.groovy:39) 在com.novoda.gradle.release.AndroidArtifacts $ from $ 2.call(未知 来源)... at org.gradle.internal.concurrent.ManagedExecutorImpl $ 1.run(ManagedExecutorImpl.java:46) 在 org.gradle.internal.concurrent.ThreadFactoryImpl $ ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
2018-07-29 02:47:24,257 [线程21]警告- ect.sync.idea.ProjectSetUpTask-原因: org.gradle.api.internal.component。用法2018年7月29日02:47:24,257 [ 线程21]信息-e.project.sync.GradleSyncState-Gradle同步 失败:原因:org.gradle.api.internal.component.Usage
有关详细信息,请咨询IDE日志(帮助|显示日志)(5秒456毫秒)
App Project gradle
> buildscript {
> repositories {
> jcenter()
>
> google()
> }
> dependencies {
>
> // Endpoints Frameworks V2: Include this dependency when using Endpoints Framework v2
> classpath 'com.android.tools.build:gradle:3.1.0+'
> classpath 'com.android.tools.build:gradle:3.1.3'
> classpath 'com.google.gms:google-services:3.1.1'
>
> } }
>
>
>
> allprojects {
> repositories {
> jcenter()
> maven { url 'https://maven.google.com' }
> mavenCentral()
> }
>
>
> tasks.withType(JavaCompile) {//this is for warning on backend: [options] bootstrap class path not set in conjunction with -source 1.7
> 1 warning
> targetCompatibility = '1.7'
> sourceCompatibility = '1.7'
> options.setBootClasspath("C:\\Program Files\\Java\\jre7\\lib\\rt.jar")
> } }
主模块gradle
apply plugin: 'com.android.application' apply plugin: 'com.google.cloud.tools.endpoints-framework-client'
buildscript {
repositories {
mavenCentral()
//maven { url 'https://maven.fabric.io/repo' }
jcenter()
maven { url 'https://maven.fabric.io/public' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.github.nrudenko:gradle-android-cq-plugin:0.1+'
classpath 'io.fabric.tools:gradle:1.+'
//Endpoints Frameworks V2: Add the new Endpoints Framework plugin dependencies
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.2'
} }
repositories {
mavenCentral()
maven { url 'http://wordpress-mobile.github.io/WordPress-Android' }
maven { url 'https://maven.fabric.io/repo' }
maven { url 'https://github.com/leonardocardoso/mvn-repo/raw/master/maven-deploy' }
maven { url "https://jitpack.io" }
maven { url 'https://oss.sonatype.org/content/groups/public' }
jcenter() }
apply plugin: 'android-cq' apply plugin: 'io.fabric'
android {
packagingOptions {
exclude "META-INF/LICENSE.txt"
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude "META-INF/NOTICE.txt"
}
compileSdkVersion 26 // former working one "24.0.0 rc2"
buildToolsVersion "26.0.1"
productFlavors {
// Define separate dev and prod product flavors.
dev {
// dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
// to pre-dex each module and produce an APK that can be tested on
// Android Lollipop without time consuming dex merging processes.
minSdkVersion 19
}
prod {
// The actual minSdkVersion for the application.
minSdkVersion 16
}
}
defaultConfig {
applicationId "com.example.app"
minSdkVersion 16
targetSdkVersion 26
renderscriptTargetApi 24
renderscriptSupportModeEnabled true
/building/multidex.html
multiDexEnabled true
buildConfigField "String", "APP_PN_KEY", "\"org.wordpress.android.playstore\""
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt', 'proguard-google-api-client.txt'
// multiDexEnabled true
}
debug {
buildConfigField "String", "APP_PN_KEY", "\"org.wordpress.android.debug.build\""
ext.enableCrashlytics = false
}
}
useLibrary 'org.apache.http.legacy'
dexOptions {
//maxProcessCount 4 // this is the default value
javaMaxHeapSize "4g"
preDexLibraries = false
}
lintOptions {
abortOnError false
}
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
...