我正在尝试将Zoom集成到我的应用程序中。我遵循这里的文档所提供的步骤。我导入了两个.arr模块,即在commonlib和mobilertc中,然后从项目结构->依赖项->应用程序-> + -> commonlib和mobilertc中添加了所需的库作为依赖项。
这些是我的build.gradle (:app)中的依赖项
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.amitshekhar.android:android-networking:1.0.2'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.karumi:dexter:6.1.2'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.android.gms:play-services-vision:20.1.3'
implementation 'com.google.firebase:firebase-messaging:23.0.0'
implementation platform('com.google.firebase:firebase-bom:25.12.0')
implementation 'com.google.firebase:firebase-analytics:20.0.2'
implementation project(':commonlib')
implementation project(':mobilertc')
implementation 'com.google.firebase:firebase-crashlytics:18.2.6'
implementation 'io.github.kexanie.library:MathView:0.0.6'
implementation 'com.google.android.exoplayer:exoplayer-core:2.16.1'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.16.1'
implementation 'com.google.android.material:material:1.5.0'
}并试着
来自gradle file
仍然会犯这个错误
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not resolve project :commonlib.
Required by:
project :app
> No matching configuration of project :commonlib was found. The consumer was configured to find a runtime of a component, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but:
- None of the consumable configurations have attributes.
> Could not resolve project :mobilertc.
Required by:
project :app
> No matching configuration of project :mobilertc was found. The consumer was configured to find a runtime of a component, preferably optimized for Android, as well as attribute
'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but:
- None of the consumable configurations have attributes.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.发布于 2022-01-18 11:08:48
首先,您必须验证java模块是否正确地添加到项目中。
Project
|
|-- commonlib
|
|-- mobilertc
|
|-- App然后,您必须更改App文件中的依赖项定义(添加"path:"):
implementation project(path: ':mobilertc')
implementation project(path: ':commonlib')并指定正确的配置。
implementation project(path: ':mobilertc', configuration: 'default')
implementation project(path: ':commonlib', configuration: 'default')https://stackoverflow.com/questions/70737771
复制相似问题