Failed to resolve: com.github.smrtyvz:ArchedImageProgressBar:2.01 - java

I hope you are fine.
I have problem in android studio, hours and hours I'm trying to implement library of Loading Button or image circular progress ( such as telegram progress ), and this library one of theme, when I try to implement in android studio I get this error message:
Failed to resolve: com.github.smrtyvz:ArchedImageProgressBar:2.01
any solution or suggestion ?
this is my root build.Gradle
buildscript {
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url "https://repo.commonsware.com.s3.amazonaws.com" }
maven {url "https://maven.springframework.org/release"}
maven { url "https://maven.restlet.com" }
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath 'com.google.gms:google-services:4.3.5'
classpath 'com.google.gms:google-services:4.3.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion 28
defaultConfig {
applicationId "blocks.youtube.hichem.soft"
minSdkVersion 21
targetSdkVersion 28
versionCode 2
versionName "1.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.4.0-alpha02'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.google.firebase:firebase-database:19.7.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.android.support:design:28.0.0'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
implementation 'com.google.firebase:firebase-storage:19.2.2'
implementation platform('com.google.firebase:firebase-bom:26.3.0')
implementation 'com.google.firebase:firebase-database-ktx'
implementation 'com.google.firebase:firebase-storage:19.2.2'
implementation 'com.github.smrtyvz:ArchedImageProgressBar:2.01'
}
the Link of Library in github ;
https://github.com/smrtyvz/ArchedImageProgressBar
whats wrong ??

You forgot to add this in your root build.gradle:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}

Try putting
repositories {
maven { url 'https://jitpack.io' }
}
in the root of your Gradle build file (outside of the buildscript tag).

Related

Cannot specify -processorpath or --processor-path via `CompileOptions.compilerArgs`

I am trying to link my app with firebase messaging services it compiled with this warning:
INFO: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
Affected Modules: app
When I run the I get the following error:
*Cannot specify -processorpath or --processor-path via `CompileOptions.compilerArgs`. Use the `CompileOptions.annotationProcessorPath` property instead.*
**My app gradle content is:**
apply plugin: 'com.android.application'
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "android.example.com.squawker"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.appcompat:appcompat:1.0.0'
testImplementation 'junit:junit:4.12'
// RecyclerView
implementation 'androidx.recyclerview:recyclerview:1.0.0'
// Schematic dependencies for ContentProvider
apt 'net.simonvt.schematic:schematic-compiler:0.6.3'
implementation 'net.simonvt.schematic:schematic:0.6.3'
// Preferences Dependencies
implementation 'androidx.preference:preference:1.0.0'
implementation 'com.google.firebase:firebase-messaging:20.1.3'
}
My project gradle content is:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2'
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I solved my problem with following setps below:
1- Remove android-apt plugin by deleting the line below:
apply plugin: 'android-apt'
2- Change apt to implementation
So apt 'net.simonvt.schematic:schematic-compiler:0.6.3'
become implementation 'net.simonvt.schematic:schematic-compiler:0.6.3'
Then the app crashes after implementing the 2 steps above:
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.example.com.myProject.provider.generated........Provider"
3- I fixed this error with adding this code in app gradle file:
android {
.........
..........
defaultConfig {
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath true
}
}
}
.....
....
}

ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version while iintegrating onesignal

I tried to implement oneSignal into my apps but I got error that said
ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[10.2.
1, 16.0.99]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.onesignal:OneSignal:3.12.3 -> com.google.android.gms:play-services-location#[10.2.1, 16.0.99], b
ut play-services-location version was 15.0.1.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.android.gms:play-services-location#{strictly 15.0.1}
-- Project 'app' depends onto com.onesignal:OneSignal#{strictly 3.12.3}
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
here is my gradle class
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/'}
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.4, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.google.com' }
}
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.gerobokgo"
minSdkVersion 26
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.Test.runner.AndroidJUnitRunner"
manifestPlaceholders = [
onesignal_app_id: '560003c8-bceb-4896-bf78-435948f4fc6d',
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: 'REMOTE'
]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-database:16.0.4'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.firebaseui:firebase-ui-database:4.3.2'
implementation 'com.google.firebase:firebase-storage:16.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
//Layout
implementation 'com.google.android.material:material:1.0.0'
//recylervieer
implementation 'androidx.recyclerview:recyclerview:1.0.0'
// image slider
implementation 'com.github.therealshabi:AutoImageFlipper:v1.4.1'
//image Cropper
implementation 'com.theartofdev.edmodo:android-image-cropper:2.1.+'
implementation 'androidx.work:work-runtime:2.2.0'
implementation 'com.braintreepayments:card-form:3.1.1'
//onesignal
implementation 'com.onesignal:OneSignal:[3.11.2, 3.99.99]'
}
I had the same problem in a Kotlin project here, the solution was to add implementation 'androidx.fragment:fragment-ktx:1.2.2' dependency to my module's build.gradle file.
I have solved the problems.
repositories {
maven { url 'https://plugins.gradle.org/m2/'}
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.4, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.google.com' }
}
just put these code on the top and sync it
For those who are using react-native version 0.60 or above one signal and intervase firebase module makes same problem. As #last gg post above,
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.1, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
copy this very top of your android/app/build.gradle file. Then rebuild your android app.
This Worked For Me
//Add One Signal Plugin At the TOP before Google GSM Plugin
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
//Add this after Plugin
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.1, 0.99.99]'
}
}
android {
compileSdkVersion 29
buildToolsVersion "29.0.1"
defaultConfig {
applicationId "com.example.example"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
android {
defaultConfig {
manifestPlaceholders = [onesignal_app_id : "******************",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "**************"]
}
}
}
repositories {
mavenCentral()
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
lintOptions{
checkReleaseBuilds false
abortOnError false
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
//Firebase Dependancy
implementation 'com.google.firebase:firebase-analytics:17.4.1'
//Onesignal Dependancy
implementation 'com.onesignal:OneSignal:[3.6.5, 3.99.99]'
}

how to solve gradle faild sync:SSL handshake connection when trying to download recycleview?

I've tried to download RecycleView in order to use in my project but this error keeps occurring and download fails.
Gradle sync failed: Could not resolve all dependencies for
configuration ':app:debugRuntimeClasspath'. Could not determine
artifacts for androidx.recyclerview:recyclerview:1.0.0 Could not
get resource
'https://dl.google.com/dl/android/maven2/androidx/recyclerview/recyclerview/1.0.0/recyclerview-1.0.0.aar'.
Could not HEAD
'https://dl.google.com/dl/android/maven2/androidx/recyclerview/recyclerview/1.0.0/recyclerview-1.0.0.aar'.
Remote host closed connection during handshake SSL peer shut
down incorrectly Consult IDE log for more details (Help | Show Log)
(12 s 965 ms)
This is the Project Build Gradle:
buildscript {
repositories {
jcenter()
mavenCentral()
google()
maven { url 'http://repo.maven.apache.org/maven2' }
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and this is the Module:App build Gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "com.aden.adenmarket"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-core:17.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.firebase:firebase-firestore:20.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
}
apply plugin: 'com.google.gms.google-services'
Since no one answered my question, I'll post this answer. Maybe it'll help someone who may face an issue like this. I solved this problem by updating Firebase libraries and
updating these two dependencies to the last version and it worked successfully .
//module:app
implementation 'com.google.firebase:firebase-auth:18.1.0'
implementation 'com.google.firebase:firebase-firestore:20.1.0'
implementation 'com.google.firebase:firebase-core:17.0.1'
//project Build Graddle
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.0'

Mopub Android Setup: 'Could not find moat-mobile-app-kit'

Expected
Building the Android mopub library successfully with the configuration outlined in the Getting Started documentation under the jcenter implementation.
Setup
build.gradle (project)
Included the jcenter and moat-sdk-builds libraries.
buildscript {
ext.kotlin_version = '1.3.11'
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://maven.google.com' }
maven { url "https://s3.amazonaws.com/moat-sdk-builds" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.2.0'
classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0-alpha09"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gralde (app)
Included the library mopub-sdk:5.4.1#aar.
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: "androidx.navigation.safeargs"
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "app.coinverse"
minSdkVersion 27
targetSdkVersion 28
versionCode 15
versionName "0.15"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
}
sourceSets {
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
}
buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
applicationIdSuffix ".staging"
debuggable true
}
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
}
dataBinding.enabled = true
}
dependencies {
def lifecycle_version = "2.0.0"
def paging_version = "2.0.0"
def nav_version = "1.0.0-alpha09"
def nav_testing_version = "1.0.0-alpha08"
def room_version = "2.0.0"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.cardview:cardview:1.0.0'
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-reactivestreams-ktx:$lifecycle_version"
implementation "androidx.paging:paging-runtime:$paging_version"
implementation "androidx.paging:paging-rxjava2:$paging_version"
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.firebase:firebase-client-android:2.5.2'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-firestore:17.1.5'
implementation 'com.google.firebase:firebase-functions:16.1.3'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.firebaseui:firebase-ui-firestore:4.2.0'
implementation 'com.firebaseui:firebase-ui-auth:4.2.1'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-inappmessaging-display:17.0.4'
implementation 'com.google.firebase:firebase-config:16.1.2'
implementation 'com.jjoe64:graphview:4.2.2'
implementation 'com.google.android.exoplayer:exoplayer-core:2.9.2'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.9.2'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation 'io.reactivex.rxjava2:rxjava:2.2.4'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation "android.arch.navigation:navigation-fragment-ktx:$nav_version"
implementation "android.arch.navigation:navigation-ui-ktx:$nav_version"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-rxjava2:$room_version"
implementation "androidx.room:room-guava:$room_version"
implementation 'com.github.bumptech.glide:glide:4.8.0'
kapt 'com.github.bumptech.glide:compiler:4.8.0'
implementation('com.mopub:mopub-sdk:5.4.1#aar') {
transitive = true
}
// Testing
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
testImplementation "androidx.arch.core:core-testing:$lifecycle_version"
androidTestImplementation "android.arch.navigation:navigation-testing:$nav_testing_version"
testImplementation "androidx.room:room-testing:$room_version"
testImplementation "android.arch.persistence.room:testing:$room_version"
}
Result
The result is the following error when building
Could not find com.moat.analytics.mobile.mpub:moat-mobile-app-kit:2.4.5.
Searched in the following locations:
file:/Users/adamhurwitz/Library/Android/sdk/extras/m2repository/com/moat/analytics/mobile/mpub/moat-mobile-app-kit/2.4.5/moat-mobile-app-kit-2.4.5.pom
file:/Users/adamhurwitz/Library/Android/sdk/extras/m2repository/com/moat/analytics/mobile/mpub/moat-mobile-app-kit/2.4.5/moat-mobile-app-kit-2.4.5.jar
file:/Users/adamhurwitz/Library/Android/sdk/extras/google/m2repository/com/moat/analytics/mobile/mpub/moat-mobile-app-kit/2.4.5/moat-mobile-app-kit-2.4.5.pom
file:/Users/adamhurwitz/Library/Android/sdk/extras/google/m2repository/com/moat/analytics/mobile/mpub/moat-mobile-app-kit/2.4.5/moat-mobile-app-kit-2.4.5.jar
file:/Users/adamhurwitz/Library/Android/sdk/extras/android/m2repository/com/moat/analytics/mobile/mpub/moat-mobile-app-kit/2.4.5/moat-mobile-app-kit-2.4.5.pom
file:/Users/adamhurwitz/Library/Android/sdk/extras/android/m2repository/com/moat/analytics/mobile/mpub/moat-mobile-app-kit/2.4.5/moat-mobile-app-kit-2.4.5.jar
https://dl.google.com/dl/android/maven2/com/moat/analytics/mobile/mpub/moat-mobile-app-kit/2.4.5/moat-mobile-app-kit-2.4.5.pom
https://dl.google.com/dl/android/maven2/com/moat/analytics/mobile/mpub/moat-mobile-app-kit/2.4.5/moat-mobile-app-kit-2.4.5.jar
https://jcenter.bintray.com/com/moat/analytics/mobile/mpub/moat-mobile-app-kit/2.4.5/moat-mobile-app-kit-2.4.5.pom
https://jcenter.bintray.com/com/moat/analytics/mobile/mpub/moat-mobile-app-kit/2.4.5/moat-mobile-app-kit-2.4.5.jar
Attempted Solution
When transitive = true is commented out in Gradle the app builds, runs, and the mopub library is present under the external libraries section.
Does transitive = trueneed to be enabled? If so, how can I resolve the Could not find com.moat.analytics.mobile.mpub:moat-mobile-app-kit error?
implementation('com.mopub:mopub-sdk:5.4.1#aar') {
//transitive = true
}
Issue Fixed With Latest MoPub Version
Find the latest version of MoPub in the documentation here.
build.gradle (project)
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://maven.google.com' }
}
...
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://maven.google.com/' }
maven { url "https://s3.amazonaws.com/moat-sdk-builds" }
}
}
build.gradle (app)
dependencies {
def mopub_version = '+#aar'
implementation("com.mopub:mopub-sdk-native-static:$mopub_version") { transitive = true }
implementation("com.mopub:mopub-sdk-native-video:$mopub_version") { transitive = true }
implementation 'com.facebook.android:audience-network-sdk:5.1.0'
implementation 'com.mopub.mediation:facebookaudiencenetwork:5.1.0.0'
implementation 'com.flurry.android:ads:11.4.0#aar'
implementation 'com.flurry.android:analytics:11.4.0#aar'
implementation 'com.mopub.mediation:flurry:11.4.0.0'
}
Deprecated Solution
I've found the solution in the Twitter Community Forumn thanks to #wacamoe.
Step 1) In gradle-wrapper.properties, ensure you are using distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip
Step 2) Ensure that in your application’s gradle script, you have
maven { url “https://s3.amazonaws.com/moat-sdk-builds 26” } in both the buildscript and allprojects sections.
It is not recommended as per the Mopub's offical documentation.
It clearly states -
To add the mopub-sdk dependency, open your project and update the app module’s build.gradle.
repositories {
// ... other project repositories
jcenter() // includes the MoPub SDK and AVID library
maven { url "https://s3.amazonaws.com/moat-sdk-builds" }
}
It clearly mentions to add the dependency in the module-level as oppose to project-level.
For more information on how to add kindly check the link here
A similar issue discussion suggest to update to the latest version which is 5.8 currently and recommended.- Check here
I tried to update the MoPub sdk to the latest with recommended steps and it builds successfully.
My module level gradle is as follows.
apply plugin: 'com.android.application'
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://s3.amazonaws.com/moat-sdk-builds" }
flatDir {
dirs 'libs-aar'
}
}
dependencies {
//MoPub
implementation('com.mopub:mopub-sdk:5.9.0#aar') {
transitive = true
// exclude module: 'moat-mobile-app-kit' // To exclude Moat
}
implementation 'com.google.ads.mediation:mopub:5.8.0.0'
}
Note: I have commented exclude module statement just to show that it is working while not using the exclude statement otherwise I have removed it from my gradle file.

Error:(9, 0): 'google()' Gradle DSL method not found

hi after i slove my problem in this question this
after building i receive this one
Error:This Gradle plugin requires Studio 3.0 minimum
then i update gradle-wrapper.properties to 3.3
i receive this
Error:(9, 0): 'google()' Gradle DSL method not found
here is my build gradle file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven {
url 'https://maven.google.com'
}
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
/* CHANGE to classpath 'com.android.tools.build:gradle:2.3.3' for STABLE BUILD TOOL VERSION*/
// classpath 'com.android.tools.build:gradle:3.0.0-alpha7'
// classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.0.0-beta1'
classpath 'com.google.gms:google-services:3.1.0'
// We recommend changing it to the latest version from our changelog:
// https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
classpath 'io.fabric.tools:gradle:1+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {
url 'https://maven.google.com'
}
// google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and this is build gradle module app
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven {
url 'https://maven.google.com'
}
// google()
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 25
buildToolsVersion '26.0.0'
defaultConfig {
applicationId "in.techware.lataxi"
minSdkVersion 15
targetSdkVersion 25
versionCode 5
versionName "1.0.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
/* Remove This to remove Crashlytics and Fabric */
/* compile('com.crashlytics.sdk.android:crashlytics:2.6.7#aar') {
transitive = true;
}*/
/* compile('com.digits.sdk.android:digits:2.0.6#aar') {
transitive = true;
}*/
implementation 'com.android.support:appcompat-v7:25.4.0'
implementation 'com.android.support:design:25.4.0'
implementation 'com.android.support:recyclerview-v7:25.4.0'
implementation 'com.squareup.okhttp3:okhttp:3.8.1'
implementation 'com.android.support:cardview-v7:25.4.0'
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.google.android.gms:play-services-maps:11.0.2'
implementation 'com.google.android.gms:play-services-location:11.0.2'
implementation 'com.google.android.gms:play-services-places:11.0.2'
implementation 'com.google.firebase:firebase-auth:11.0.2'
implementation 'com.google.firebase:firebase-messaging:11.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta1'
implementation 'com.google.code.gson:gson:2.8.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
The google() repo requires also gradle v4 and Android Studio 3.x.
Try to use in gradle-wrapper.properties
distributionUrl=\
https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip
In any case you can use the same maven repo using { url 'https://maven.google.com'} (it is the same).
buildscript {
repositories {
maven {
url 'https://maven.google.com'
}
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
//
}

Categories

Resources