Integrating the Navmii SDK for android - android

I'm getting error while trying to Add the dependencies of the navmii sdk
I'm following the documentation to add the dependencies:
http://navmii.com/android-sdk-documentation/
In order to add the SDK library to your application insert the following code into your app’s build.gradle:
repositories {
maven {
url 'TODO'
}
}
dependencies {
compile ('com.navmii.android:navmiisdk:1.0.0.36167#aar') // TODO update the version
}
i got error massage says : Error:(18, 0) Could not find method compile() for arguments [com.navmii.android:navmiisdk:1.0.0.36167#aar] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Open File
My gradle.build file :
buildscript {
repositories {
google()
jcenter()
repositories {
maven {
url 'TODO'
}
}}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
compile ('com.navmii.android:navmiisdk:1.0.0.36167#aar')
// 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
}
What's the problem ?

Related

How do you fix the following error : Could not find method classpath() for arguments

I am getting the following error when trying to run my Kotlin app with Android Studio and I am unsure why, any ideas?
A problem occurred evaluating root project 'Weather App'.
Could not find method classpath() for arguments [com.android.tools.build:gradle:5.1.2] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
buildscript {
ext.kotlin_version = '2.4.30'
ext.room_version = '3.3.0-beta02'
ext.navigation_version = '2.0.0'
ext.kodein_version = '6.2.0'
ext.lifecycle_version = '3.3.0'
ext.retrofit_version = '3.9.0'
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
}
dependencies {
classpath 'com.android.tools.build:gradle:5.1.2' // ERROR LINE 17
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'android.arch.navigation:mavigation-safe-args-gradle-plugin:2.0.0-aplha06'
// 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
}
change classpath:
classpath "com.android.tools.build:gradle:4.1.1"

Could not find method maven() for arguments [build_48jju0eu9q7aafln0yi713a7l$_run_closure1$_closure4#3cb5a1fe]

My build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
maven {
url "https://maven.google.com"
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
**My error code is
Could not find method maven() for arguments [build_48jju0eu9q7aafln0yi713a7l$_run_closure1$_closure4#3cb5a1fe] on root project 'androidtest2' of type org.gradle.api.Project.**
and
https://github.com/ujink/Android-HC06-Arduino
this program
Move the maven block inside the repositories block:
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}

how to fix " Could not find com.android.tools.build:gradle:3.4.1

I'm new in react native, when i wanted to run my first project, i got this error,
how to fix it, thanks for your attentions
" Could not find com.android.tools.build:gradle:3.4.1.
Searched in the following locations:
this and this
project/buil.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven {
url 'https://dl.google.com/dl/android/maven2'
}
jcenter()
mavenCentral()
//apply plugin: 'jetty'
apply plugin: 'maven'
google()
jcenter()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build.jetifier:jetifier-core:1.0.0-beta04'
classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta04'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
//task clean(type: Delete) {
// delete rootProject.buildDir
//}

Could not find method kotlin() for arguments [gradle-plugin, 1.3.20]

I've copied exactly what the kotlin gradle docs say to implement kotlin gradle plugin, however it's returning the following error:
Could not find method kotlin() for arguments [gradle-plugin, 1.3.20] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
my gradle
buildscript {
ext.kotlin_version = '1.3.0'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath(kotlin("gradle-plugin", version = "1.3.20"))
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
// ext {
// navigationVersion = '28.0.0'
// }
plugins {
kotlin("<...>")
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Any idea?
build.gradle can be written in Groovy or Kotlin. You're typing your build.gradle in Groovy (not Kotlin), but you have copied the Kotlin code. You should select the Groovy tab on the documentation:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:3.3.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20"
}
}
Here: https://kotlinlang.org/docs/reference/using-gradle.html#targeting-android
You can also find a decent example by creating an empty Android and Kotlin project.

Gradle-lint-plugin does not show up in my console log

Trying the gradle-lint-plugin I get no console output even do the project is large. I think I missed something in the configuration and asking here for help to find that.
Reading the wiki Using-Lint there´s nothing mentioned if the lintGradle task dosen´t find anything to warn about, maybe that´s what happening in my case.
Here´s the build.grade.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://jitpack.io' }
maven { url "https://jcenter.bintray.com" }
maven { url 'https://maven.fabric.io/public' }
google()
}
dependencies {
classpath 'com.netflix.nebula:gradle-lint-plugin:9.0.0'
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.2.0'
classpath ('com.google.firebase:firebase-plugins:1.0.5') {
// Note https://issuetracker.google.com/issues/38419426#comment8
exclude group: 'com.google.guava', module: 'guava-jdk5'
}
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id 'nebula.lint' version '9.0.0'
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
google()
}
}
apply plugin: 'nebula.lint'
gradleLint.rules = ['dependency-parentheses']
gradleLint.criticalRules = ['unused-dependency'] // <-- this will fail the build in the event of a violation
// gradleLint.alwaysRun = false
task clean(type: Delete) {
delete rootProject.buildDir
}

Categories

Resources