book questions
This commit is contained in:
@@ -270,6 +270,37 @@ https://tianchi.aliyun.com/dataset/93864
|
||||
解决方法:
|
||||
- 在项目的顶层的 gradle.properties 中添加 tuanjieStreamingAssets 配置
|
||||
tuanjieStreamingAssets=.unity3d, google-services-desktop.json, google-services.json, GoogleService-Info.plist
|
||||
|
||||
|
||||
|
||||
4. 问题描述:重新从 Tuanjie 导出 tuanjieLibrary 后报错:
|
||||
Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'tuanjieLibrary\build.gradle'
|
||||
原因:tuanjieLibrary/build.gradle 里的 repositories {} 块与根目录 settings.gradle 中的
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 冲突。
|
||||
解决方法:
|
||||
- 直接删除 tuanjieLibrary/build.gradle 中的整个 repositories {} 块。
|
||||
- 所需的 Aliyun 镜像已在 settings.gradle 的 dependencyResolutionManagement.repositories 中统一声明,无需重复。
|
||||
|
||||
5. 问题描述:Build file 'D:\code\digital_person\tuanjieLibrary\build.gradle' line: 6
|
||||
|
||||
Error resolving plugin [id: 'com.android.application', version: '7.4.2', apply: false]
|
||||
> The request for this plugin could not be satisfied because the plugin is already on the classpath with a different version (8.2.2).
|
||||
|
||||
解决方法:
|
||||
直接修改项目的 build.gradle 文件,将插件版本改为一致的 8.2.2
|
||||
|
||||
6. 问题描述:Build file 'D:\code\digital_person\tuanjieLibrary\build.gradle' line: 16
|
||||
|
||||
A problem occurred evaluating project ':tuanjieLibrary'.
|
||||
> Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'tuanjieLibrary\build.gradle'
|
||||
|
||||
解决方法(见问题4):删除 tuanjieLibrary/build.gradle 中的 repositories {} 块。
|
||||
|
||||
7. 问题描述:重新从 Tuanjie 导出后,:tuanjieLibrary 模块无法被 :app 解析:
|
||||
Could not resolve project :tuanjieLibrary.
|
||||
> No matching configuration of project :tuanjieLibrary was found. None of the consumable configurations have attributes.
|
||||
原因:Tuanjie 重新导出后,tuanjieLibrary/build.gradle 被还原为只含 apply false 的"根项目"构建文件,
|
||||
没有 apply plugin: 'com.android.library',Gradle 无法识别该模块为 Android 库。
|
||||
解决方法:
|
||||
- 将 tuanjieLibrary/build.gradle 替换为完整的 Android library 模块构建文件(apply plugin: 'com.android.library'),
|
||||
参考 launcher/build.gradle 的配置(compileSdkVersion、ndkVersion、ndkPath、aaptOptions、buildTypes 等),
|
||||
并在 dependencies 中添加 implementation files('libs/unity-classes.jar')。
|
||||
- 注意:每次从 Tuanjie 重新导出后都需要重新替换该文件。
|
||||
Reference in New Issue
Block a user