facebook twitter hatena line email

「Monaca/admob/admob-free/mediation/他」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(参考)
(iosの場合)
行87: 行87:
 
     }
 
     }
 
}
 
}
 +
</pre>
 +
 +
===以下Zucksエラーが起こるとき===
 +
<pre>
 +
Could not determine the dependencies of task ':app:preDebugBuild'.
 +
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
 +
  > Could not find net.zucks:zucks-ad-network-sdk:4.6.1.
 +
</pre>
 +
gradleに以下を追加
 +
<pre>
 +
maven {
 +
  url 'https://github.com/zucks/ZucksAdNetworkSDK-Maven/raw/master/'
 +
}
 +
</pre>
 +
 +
===以下maioエラーが起こるとき===
 +
<pre>
 +
Could not determine the dependencies of task ':app:preDebugBuild'.
 +
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
 +
  > Could not find com.maio:android-sdk:1.1.6.
 +
</pre>
 +
 +
gradleに以下を追加
 +
<pre>
 +
maven{
 +
    url "https://imobile-maio.github.io/maven"
 +
}
 +
</pre>
 +
 +
===basementの競合エラーのとき===
 +
<pre>
 +
      Could not determine the dependencies of task ':app:preDebugBuild'.
 +
      > Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
 +
          > Could not resolve com.google.android.gms:play-services-basement:[15.0.1,16.0.0).
 +
</pre>
 +
plugin.xmlに以下のようにバージョンを15.0.1へ
 +
<pre>
 +
<framework src="com.google.android.gms:play-services-basement:15.0.1" />
 +
</pre>
 +
===tasksの競合エラーのとき===
 +
<pre>
 +
> Could not resolve com.google.android.gms:play-services-tasks:[15.0.1,16.0.0).
 +
            Required by:
 +
                project :app > com.google.android.gms:play-services-location:15.0.1
 +
            > Failed to list versions for com.google.android.gms:play-services-tasks.
 +
</pre>
 +
plugin.xmlに以下のようにバージョンを15.0.1へ
 +
<pre>
 +
<framework src="com.google.android.gms:play-services-tasks:15.0.1" />
 
</pre>
 
</pre>
  

2020年6月17日 (水) 19:03時点における版

他色々のメディエーションを使いたい場合

androidの場合

androidでは以下をplugin.xmlに追加する

    <platform name="android">
        <framework src="build-extras.gradle" custom="true" type="gradleReference"/>
        <framework src="com.unity3d.ads:unity-ads:+" />
        <framework src="com.google.ads.mediation:unity:+" />
        <framework src="com.facebook.android:audience-network-sdk:+" />
        <framework src="com.google.ads.mediation:facebook:+" />
        <framework src="net.nend.android:nend-sdk:5.4.2" />
        <framework src="com.google.ads.mediation:nend:+" />

        <framework src="com.android.support:appcompat-v7:26.1.0" />
        <framework src="com.android.support.constraint:constraint-layout:1.1.3" />
        <framework src="com.google.android.gms:play-services-basement:15.0.1" />
        <framework src="com.google.android.gms:play-services-ads:15.0.1" />
        <framework src="com.google.android.gms:play-services-location:15.0.1" />
        <dependency id="cordova-plugin-enable-multidex" />
    </platform>

以下エラーが発生する場合

> Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
    > Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
        > Could not resolve com.google.android.gms:play-services-basement:[15.0.1,16.0.0).
            Required by:
                project :app > com.google.android.gms:play-services-location:15.0.1
                project :app > com.google.android.gms:play-services-places-placereport:15.0.1
             > Failed to list versions for com.google.android.gms:play-services-basement.

おそらくversionが競合してるので、以下のように、15.0.1にするとか

<framework src="com.google.android.gms:play-services-basement:15.0.1" />

以下エラーが発生する場合

> Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

    > Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
           > Could not resolve com.google.android.gms:play-services-tasks:[15.0.1,16.0.0).
                    Required by:
                        project :app > com.google.android.gms:play-services-location:15.0.1
                     > Failed to list versions for com.google.android.gms:play-services-tasks.

おそらくversionが競合してるので、以下のように、15.0.1にするとか

<framework src="com.google.android.gms:play-services-tasks:15.0.1" />
                     

maven設定方法

plugin.xml

<platform name="android">
       <framework src="build-extras.gradle" custom="true" type="gradleReference"/>
</platform>

build-extras.gradle

ext.postBuildExtras = {
    allprojects {
        repositories {
            maven {
                url "https://maven.google.com"
            }
            jcenter()
            maven {
              url 'http://fan-adn.github.io/nendSDK-Android-lib/library'
            }
            maven { 
              url 'https://github.com/zucks/ZucksAdNetworkSDK-Maven/raw/master/' 
            }
            maven{
                url "https://imobile-maio.github.io/maven"
            }
            maven {
                url  "https://adcolony.bintray.com/AdColony"
            }
        }
    }
    android {
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    }
    configurations.all {
        resolutionStrategy {
            force 'com.android.support:support-v4:26.+'
        }
    }
}

以下Zucksエラーが起こるとき

Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find net.zucks:zucks-ad-network-sdk:4.6.1.

gradleに以下を追加

maven { 
  url 'https://github.com/zucks/ZucksAdNetworkSDK-Maven/raw/master/' 
}

以下maioエラーが起こるとき

Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.maio:android-sdk:1.1.6.

gradleに以下を追加

maven{
    url "https://imobile-maio.github.io/maven"
}

basementの競合エラーのとき

       Could not determine the dependencies of task ':app:preDebugBuild'.
       > Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
          > Could not resolve com.google.android.gms:play-services-basement:[15.0.1,16.0.0).

plugin.xmlに以下のようにバージョンを15.0.1へ

<framework src="com.google.android.gms:play-services-basement:15.0.1" />

tasksの競合エラーのとき

> Could not resolve com.google.android.gms:play-services-tasks:[15.0.1,16.0.0).
            Required by:
                project :app > com.google.android.gms:play-services-location:15.0.1
             > Failed to list versions for com.google.android.gms:play-services-tasks.

plugin.xmlに以下のようにバージョンを15.0.1へ

<framework src="com.google.android.gms:play-services-tasks:15.0.1" />

iosの場合

plugin.xmlに追加

<platform name="ios">
      <pods use-frameworks="true">
        <pod name="GoogleMobileAdsMediationUnity" spec="~> 3.1"/>
        <pod name="GoogleMobileAdsMediationFacebook" spec="~> 5.4" />
        <pod name="GoogleMobileAdsMediationNend" spec="~> 5.4.1.0" />
      </pods>
</platform>