0

I am trying to implement AdColony ads into a new app I'm writing. I have followed the SDK integration guide, but am getting cant resolve symbol issues.

Per the guide I have added the following to my manifest:

<activity android:name="com.jirbo.adcolony.AdColonyOverlay"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />

<activity android:name="com.jirbo.adcolony.AdColonyFullscreen"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />

<activity android:name="com.jirbo.adcolony.AdColonyBrowser"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />

In my manifest all 3 have the same issue, in the android:name= field,everything but com is red and hovering says "Cannot resolve symbol 'jirbo'", "Cannot resolve symbol 'adcolony'", "Cannot resolve symbol 'AdColonyOverlay'", etc etc.

Manifest Screenshot

I have added the SDK libs to my projects libs folder. I also have the issue in my activity.

import com.jirbo.adcolony.*;

In that, the jirbo gives the cannot resolve symbol issue. Import Screenshot

Dependencies in build.gradle: gradle

Per comment, added to gradle, tried with both direct copy/paste leaving as

compile name: 'fyber-mediation-adcolony-[version]' , ext: 'aar'

as well as

compile name: 'fyber-mediation-adcolony-2.2.2' , ext: 'aar'

neither works, throws the following error on sync: gradle error

4

2 回答 2

0

只需将 'maven { url " https://adcolony.bintray.com/AdColony " } ' 添加到存储库下的项目 gradle 中

于 2019-07-21T12:46:55.953 回答
0

我遇到了同样的问题。我只是忽略了“red jirbo”并在设备上运行了该应用程序。它运行成功,AdColony 日志显示:

I/AdColony: ==== Configuring AdColony 2.3.5 with app/zone ids: ====
I/AdColony: <app ID used in AdColony.configure()>
I/AdColony: <zone ID used in AdColony.configure()>

不幸的是,“jirbo”和“AdColony”类仍然是红色的——但它确实有效!

编辑:在 Android Studio 中单击“使用 Gradle 文件同步项目”修复它!(“AVD Manager”左侧的图标)

于 2016-04-23T08:50:52.510 回答