buildscript {
repositories {
maven {
url "https://maven.google.com"
}
maven {
url 'https://plugins.gradle.org/m2/'
}
maven {
url "https://google.bintray.com/mobile-ads-adapters-android"
}
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.11.0, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
android {
//the compression of webp file during build causes problem with FileDescriptor in ContentProvider
aaptOptions {
noCompress "webp"
}
signingConfigs {
signing_config {
keyAlias 'abc'
keyPassword '123'
}
}
compileSdkVersion 28
defaultConfig {
applicationId ""
minSdkVersion 17
targetSdkVersion 28
multiDexEnabled true
versionCode 54
versionName "6.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
def contentProviderAuthority = applicationId + ".stickercontentprovider"
// Creates a placeholder property to use in the manifest.
manifestPlaceholders =
[contentProviderAuthority : contentProviderAuthority, onesignal_app_id: '',
onesignal_google_project_number: 'REMOTE']
// Adds a new field for the authority to the BuildConfig class.
buildConfigField("String",
"CONTENT_PROVIDER_AUTHORITY",
"\"${contentProviderAuthority}\"")
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
task checkDebug {
doLast {
println("checkDebug")
if (android.defaultConfig.applicationId.startsWith("com.whatsapp")) {
throw new GradleException("");
}
checkApplicationIdInDebug()
}
}
private void checkApplicationIdInDebug() {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def ignoreApplicationIdCheck = properties.getProperty('ignoreApplicationIdCheck')
if (ignoreApplicationIdCheck == null) {
if (android.defaultConfig.applicationId.equals("")) {
throw new GradleException("");
}
} else {
println("application id check ignored")
}
}
task checkRelease {
doLast {
println("checkRelease")
if (android.defaultConfig.applicationId.startsWith("com.example")) {
throw new GradleException("");
}
}
}
tasks.whenTaskAdded { task ->
println(task.name)
if (task.name.contains("assembleDebug")) {
task.dependsOn checkDebug
}
if (task.name.contains("assembleRelease")) {
task.dependsOn checkRelease
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.firebase:firebase-ads:18.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.facebook.fresco:fresco:1.13.0'
implementation 'com.facebook.fresco:webpsupport:1.13.0'
implementation 'com.facebook.fresco:animated-base:1.13.0'
implementation 'com.facebook.fresco:webpsupport:1.13.0'
// implementation 'com.facebook.android:facebook-android-sdk:4.1.0'
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.firebase:firebase-messaging:19.0.1'
implementation 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
implementation 'org.jsoup:jsoup:1.11.1'
implementation files('libs\\AudienceNetwork.aar')
implementation files('libs\\facebook-5.4.0.0.aar')
implementation 'com.android.installreferrer:installreferrer:1.1'
// implementation ('com.google.ads.mediation:facebook:5.4.0.0')
// implementation 'com.facebook.android:audience-network-sdk:5.+'
//implementation 'com.google.android.gms:play-services-ads:18.2.0'
implementation('com.google.android.ads:mediation-test-suite:0.9.5')
implementation 'com.google.firebase:firebase-config:18.0.0'
// implementation 'androidx.appcompat:appcompat:1.0.2'
/* implementation ('com.google.ads.mediation:facebook:5.4.0.0')
{
exclude group:"com.google.android.gms"
}
*/
implementation 'com.github.bumptech.glide:glide:4.0.0-RC1'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.jsibbold:zoomage:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.gms:play-services-ads:18.3.0'
implementation 'com.android.billingclient:billing:+'
implementation 'com.android.billingclient:billing:1.0'
implementation 'com.heinrichreimersoftware:material-intro:1.6'
implementation 'ja.burhanrashid52:photoeditor:0.3.3'
implementation 'com.github.iammert:MaterialIntroView:5e0c6b6'
implementation project(':NativeTemplatesAndroid-1.0.0')
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
/*implementation('com.mopub:mopub-sdk:5.10.0') {
transitive = true
// exclude module: 'moat-mobile-app-kit' // To exclude Moat
}*/
implementation 'com.google.ads.mediation:mopub:5.8.0.0'
}
apply plugin: 'com.google.gms.google-services'
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
flatDir {
dirs 'libs'
}
maven {
url 'https://maven.fabric.io/public'
}
maven {
url "https://s3.amazonaws.com/moat-sdk-builds"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.gms:google-services:4.0.2'
classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
}
maven {
url "https://jitpack.io"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Hi Eduardo,
Thank you for reaching out to us.
You may try modifying the import of the Maven repository as follows:
If the situation persists despite the above, could you then kindly provide the details below (via Reply privately to author) so that I can further investigate the issue?
Regards,
Ziv Yves Sanchez
Mobile Ads SDK Team
Hi Eduardo,
It seems that there was no attached project in your previous reply. Could you kindly send the attached project again, via Reply privately to author?
Also, I would recommend that you forward your concern as well to the support channels of MoPub or Moat Analytics, as we are only able to provide very limited insights on such third-party SDKs.
Hi Eduardo,
Thank you for providing your sample project in private.
I was able to confirm the same issue that you were experiencing, and was able to solve it via following the import instructions on this page. Specifically, you have to add the repositories section in your app-level build.gradle file (not the project-level build.gradle). Afterwards, you have to migrate the project to AndroidX via creating a gradle.properties file at the base folder of your project, then adding the two lines as described in that page.
Kindly confirm if the above would fix the issue on your end. If the issue still persists, you may send another copy of your project via Reply privately to author so that I can further investigate.
--
---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/BcKaK000000000000000000000000000000000000000000000Q48E7M00NUnRVSrQRZiEvvI5JrgTEQ%40sfdc.net.
Hi Buergo,
If you need any help for any technical concern with the AdMob SDK, kindly create a new thread so that we can assist you better on it.