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

编译不了 #52

Closed
shenyunhuan opened this issue May 23, 2022 · 5 comments
Closed

编译不了 #52

shenyunhuan opened this issue May 23, 2022 · 5 comments

Comments

@shenyunhuan
Copy link

配置文件如下
---------根build
buildscript {
dependencies {
classpath('com.google.dagger:hilt-android-gradle-plugin:2.42')
classpath('io.github.trycatchx:rocketx:1.1.0')
}
}
plugins {
id 'com.android.application' version '7.2.0' apply false
id 'com.android.library' version '7.2.0' apply false
id 'org.jetbrains.kotlin.android' version '1.6.20' apply false
}

task clean(type: Delete) {
delete rootProject.buildDir
}

-----------------settings
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()

}

}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven {
url 'https://jitpack.io'
}
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven {
url 'https://maven.aliyun.com/nexus/content/repositories/releases/'
}
maven {
url 'https://maven.aliyun.com/nexus/content/repositories/releases/'
}
}
}
include ':app'
---------app build
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
id 'com.rocketx'
}

报错
An exception occurred applying plugin request [id: 'com.rocketx']

Failed to apply plugin 'com.rocketx'.
Build was configured to prefer settings repositories over project repositories but repository 'flatDir' was added by plugin 'com.rocketx'

@trycatchx
Copy link
Owner

@shenyunhuan 去掉 repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)

@shenyunhuan
Copy link
Author

去掉这个更加报错,之前就试过

@shenyunhuan
Copy link
Author

所有的第三方包都找不到了

@trycatchx
Copy link
Owner

trycatchx commented May 23, 2022

把 repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 改成repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)

@shenyunhuan 问题同 issue31, 解决办法

@shenyunhuan
Copy link
Author

1 problem was found storing the configuration cache.

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

2 participants