问题描述
我需要MoPub集成了3个不同的游戏共享一个Android库中。
我试图用织物的插件,但没有成功......一些尝试后,我得到这个错误:
错误:无法解析:com.mopub.volley:mopub凌空:1.1.0
然后我也试图按照本指南,你可以在这里找到(),但我总是得到一些错误(我无法通过终端执行命令的gradle或我得到相同的错误上面提到的)。
有人能帮助我吗?
谢谢
米尔科
更新
由于@Edward我能够在我的项目导入正确mopub-SDK。
为了修复mopub凌空抽射错误,先清洁液,读哪些文件在控制台丢失,看路,重新指定路径,添加mopub凌空-1.1.0.jar,mopub-凌空-1.1.0.pom的文件夹中。
重建,你准备去!
If you get another error related to the millenial sdk, add this line in the dependencies section of the build.gradle file inside the mopub-sdk library:
compile fileTree(dir: 'libs', include: ['*.jar'])
you should get something like this:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:22.0.0'
compile 'com.android.support:support-annotations:22.0.0'
compile 'com.mopub.volley:mopub-volley:1.1.0'
}
Hope this can help you!
- Go download the MoPub SDK.
- Unzip and you will get a mopub-sdk folder
- Navigate to your ‘Project location’, go into your project folder, and drop the unzipped mopub-sdk into the folder.
Navigate back to Android Studio and open your project's settings.gradle file and include the MoPub SDK as a module as shown below. You may need to sync Gradle again in Android Studio to have the ‘mopub-sdk’ show up in the left Project window.
include ':app', ':mopub-sdk'
Open your project's build.gradle file and add jcenter as a repository and the MoPub SDK as a dependency:
repositories { jcenter()}
...
dependencies { compile project(':mopub-sdk')...}
这篇关于如何整合MoPub在Android中Studio中的共享库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!