goal:
i am intigrating aviary sdk to my existing android application i followed document frm link1 link2
as described in documentation i did but i got this error
Error:(18, 0) Cannot invoke method mavenLocal() on null object
can anyone help me to fix this
code
gradle:app
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
repositories {
mavenCentral()
jcenter()
mavenLocal()
maven {
name 'maven.aviary.com'
url uri("http://maven.aviary.com/repo/release")
}
}
android {
compileSdkVersion 25
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.example.altu.mysignature"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
/* 3) Exclude duplicate licenses */
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/DEPENDENCIES'
pickFirst 'AndroidManifest.xml'
}
}
dependencies {
compile 'com.adobe.creativesdk.foundation:auth:0.9.1186'
compile 'com.aviary.android.feather.sdk:aviary-sdk:3.6.3'
compile 'gun0912.ted:tedpermission:1.0.2'
compile 'gun0912.ted:tedbottompicker:1.0.3'
compile 'com.android.support:appcompat-v7:25.+'
testCompile 'junit:junit:4.12'
compile 'com.github.gcacace:signature-pad:1.2.0'
debugCompile 'com.github.rtugeek:ColorSeekBar:1.1.2'
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'
})
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.google.android.gms:play-services-ads:10.0.1'
}
applicationnamne.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'me.tatarka:gradle-retrolambda:3.3.0-beta4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
}mavenLocal()
maven {
name 'maven.aviary.com'
url uri("http://maven.aviary.com/repo/release")
}
maven {
url 'https://repo.adobe.com/nexus/content/repositories/releases/'
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Your error is here:
allprojects {
repositories {
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
}mavenLocal() <--
You have to remove the } since it closes the repositories block
Related
I have tried to use ibm tone analyzer api for my project, but if I include the dependency I get this error:
Duplicate class javax.annotation.CheckForNull found in modules
annotations-3.0.1.jar (com.google.code.findbugs:annotations:3.0.1) and
jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2) Duplicate
class javax.annotation.CheckForSigned found in modules
annotations-3.0.1.jar (com.google.code.findbugs:annotations:3.0.1) and
jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
I have tried to delete testing dependencies, but still won't work, please help
App File:
apply plugin: 'com.android.application'
android {
configurations.all{
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
compileSdkVersion 28
defaultConfig {
applicationId "com.example.loginapp"
minSdkVersion 22
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
compile 'com.ibm.watson:tone-analyzer:7.0.0'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
exclude module: 'jsr305:3.0.2'
})
implementation 'com.google.firebase:firebase-auth:16.2.1'
}
// Add the following line to the bottom of the file:
apply plugin: 'com.google.gms.google-services' // Google Play services Gradle plugin
Gradle Build file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
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 {
maven {
url "https://dl.bintray.com/ibm-cloud-sdks/ibm-cloud-sdk-repo"
}
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
add applicationVariants.all to your gradle.build:
android {
applicationVariants.all { variant ->
variant.getRuntimeConfiguration().exclude group: 'com.google.code.findbugs', module: 'jsr305'
}
}
Actually, it worked but I did not understand and I get an error. How can I fix it?
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.example"
minSdkVersion 18
targetSdkVersion 24
versionCode 1
versionName "1.0"
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'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.:conciseclock:0-SNAPSHOT'
testCompile 'junit:junit:4.12'
}
and
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
}
allprojects {
repositories {
jcenter()
maven{ url 'https://dl.bintray.com/spark/maven' }
maven { url "https://jitpack.io" }
mavenCentral()
}
}
task customClean(type: Delete) {
delete rootProject.buildDir
}
Error:A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
Could not find com.:conciseclock:0-SNAPSHOT.
Required by:
project :app
Error(37,13) Failed to resolve: com.:conciseclock:0-SNAPSHOT
Try with compile 'com.tomduan.conciseclock:library:0.2.2'
Anyway, where did you get this snapshot, because it looks like you are using custom repository manager, not official git.
easy there is no library on this dependences
com.github.zurnacibatuhan:conciseclock:0-SNAPSHOT
or i recommend to check library version so there is no number version as
0-SNAPSHOT
or replace with this line
compile 'com.tomduan.conciseclock:library:0.2.2'
you are using 25.3.1 version in your dependencies.it means you should first add this to your project gradle repositories like this
allprojects {
repositories {
jcenter()
maven{ url 'https://dl.bintray.com/spark/maven' }
maven { url "https://jitpack.io" }
maven {url "https://maven.google.com"}
}
add line
maven {url "https://maven.google.com"}
after that you should replace this line:
compile 'com.github.zurnacibatuhan:conciseclock:0-SNAPSHOT'
with this line:
compile 'com.tomduan.conciseclock:library:0.2.2'
I addded jar which require,
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
which require jack to support java8.
According to latest kotlin plugin gives, Error:Kotlin Gradle plugin does not support the deprecated Jack toolchain.
Disable Jack or revert to Kotlin Gradle plugin version 1.1.1.
Currently not able recreate jar with java7. And need use latest version of kotlin which has deprecated Jack toolchain.
I check all possible ways in app.gradle.
Not able to solve this by preview version of studio 3.0 according to this.
project level gradle file,
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.1.3'
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
app level gradle file,
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.root.trial"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
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'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile files('libs/bel-1.0.jar')
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}
repositories {
mavenCentral()
}
You have not updated gradle plugin in build.gradle(:project).
Replace you project level gradle file with following:
buildscript {
ext.kotlin_version = '1.1.3-2'
repositories {
maven { url 'https://maven.google.com' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha9'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// 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' }
jcenter()
}
}
I hope it helps.
I trying to add Adobe Creative Sdk into Android app ,I follow this(https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html) tutorial ,but when I synic the project following error show on logcat...
C:\Users\Muzamil Hussain\AndroidStudioProjects\SwitchApp\app\build\intermediates\res\merged\debug\values\values.xml
Error:(2599, 44) No resource found that matches the given name (at 'android:textColorHint' with value '#color/hint_foreground_material_light').
Error:(2599, 44) No resource found that matches the given name (at 'android:textColorHint' with value '#color/hint_foreground_material_light').
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
for value.xml file.
my gradle app file:
apply plugin: 'com.android.application'
/* 1) Apply the Gradle Retrolambda Plugin */
apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 24
buildToolsVersion '24.0.3'
defaultConfig {
applicationId "com.example.muzamil_hussain.switchapp"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [appPackageName: "dfc,,,,myapi key........mmmm"]
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
/* 2) Compile for Java 1.8 or greater */
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
/* 3) Exclude duplicate licenses */
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/DEPENDENCIES'
pickFirst 'AndroidManifest.xml'
}
// This is handled for you by the 2.0+ Gradle Plugin
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.0.3'
testCompile 'junit:junit:4.12'
compile 'com.google.firebase:firebase-database:9.8.0'
compile 'com.google.firebase:firebase-core:9.8.0'
compile 'com.google.firebase:firebase-auth:9.8.0'
compile 'com.google.firebase:firebase-storage:9.8.0'
compile 'com.google.firebase:firebase-crash:9.8.0'
compile 'com.google.firebase:firebase-messaging:9.8.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5]'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'com.firebase:firebase-client-android:2.5.2'
compile 'com.firebaseui:firebase-ui:0.6.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.pkmmte.view:circularimageview:1.1'
compile 'com.github.QuadFlask:colorpicker:0.0.12'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.7.4'
compile 'com.adobe.creativesdk.foundation:auth:0.9.1186'
compile 'com.adobe.creativesdk:image:4.6.3'
compile 'com.localytics.android:library:3.8.0'
}
apply plugin: 'com.google.gms.google-services'
and this build.gradle(project: name)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.google.gms:google-services:3.0.0'
/* 1) Add the Gradle Retrolambda Plugin */
classpath 'me.tatarka:gradle-retrolambda:3.3.0-beta4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
/* 2) Add mavenCentral */
mavenCentral()
/* 3) Add the Creative SDK Maven repo URL */
maven {
url 'https://repo.adobe.com/nexus/content/repositories/releases/'
}
maven {
url 'http://maven.localytics.com/public'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Enable android support.
Go to File>Settings>Plugins then enable it.
I have an app with Android annotations that is giving me a NoClassDefFoundError when I try to run it.
java.lang.NoClassDefFoundError: br.socialcondo.app.rest.services.UserService_
In the annotations log I can see that this class is generated:
Note: Generating class: br.socialcondo.app.rest.services.UserService_
What I am doing wrong here?
EDIT
Sharing build.gradle
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "http://dl.bintray.com/populov/maven" }
mavenCentral()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "http://dl.bintray.com/populov/maven" }
maven { url "https://repo.commonsware.com.s3.amazonaws.com" }
mavenCentral()
}
configurations {
apt
}
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
dexOptions {
javaMaxHeapSize "4g"
}
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
versionCode 30
versionName "2.0.0"
multiDexEnabled true
}
signingConfigs {
release {
storeFile file("xxx")
storePassword "xxx"
keyAlias "xxx"
keyPassword "xxx"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
buildTypes {
release {
ext.betaDistributionGroupAliases = "devs"
minifyEnabled false
signingConfig signingConfigs.release
}
}
productFlavors {
production {
applicationId "br.socialcondo.app"
}
development {
applicationId "br.socialcondo.app"
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license.txt'
exclude 'META-INF/notice.txt'
}
}
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
resourcePackageName 'br.socialcondo.app'
}
}
dependencies {
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
compile group: 'com.google.guava', name: 'guava', version: '11.0.2'
// You must install or update the Google Repository through the SDK manager to use this dependency.
// The Google Repository (separate from the corresponding library) can be found in the Extras category.
// compile 'com.google.android.gms:play-services:4.2.42'
// You must install or update the Google Repository through the SDK manager to use this dependency.
// The Google Repository (separate from the corresponding library) can be found in the Extras category.
//
apt 'org.androidannotations:androidannotations:3.2'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libraries:facebook')
compile project(':libraries:caldroid')
compile 'org.codehaus.jackson:jackson-jaxrs:1.9.13'
compile 'org.androidannotations:androidannotations-api:3.2'
compile 'com.google.android.gms:play-services:6.1.+'
compile 'com.android.support:support-v4:22.1.1'
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.android.support:recyclerview-v7:22.1.1'
compile 'com.android.support:gridlayout-v7:22.1.1'
compile 'de.greenrobot:greendao:1.3.7'
compile 'com.koushikdutta.urlimageviewhelper:urlimageviewhelper:1.0.4'
compile('com.crashlytics.sdk.android:crashlytics:2.2.4#aar') {
transitive = true
}
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.makeramen:roundedimageview:1.5.0'
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.kbeanie:image-chooser-library:1.4.02#aar'
compile 'com.github.chrisbanes.photoview:library:1.2.3'
compile 'com.commonsware.cwac:endless:1.2.3'
compile 'com.malinskiy:superrecyclerview:1.1.0'
}
EDIT 2
Root build.gradle
buildscript {
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
classpath 'io.fabric.tools:gradle:1.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
The problem is with
multiDexEnabled true
It is only supported on Android 5 natively. So I need a library for this
to run in older versions. I found the fix.