Failed to resolve: com.dft.android:onyx-enroll-wizard:4.1.3 - android

please help me , i got bellow error.
I am try to integrate "onyxenrollwizardsampleapp" Sample app in my Project as a module, but getting below error.
//Module app:
apply plugin: 'com.android.library'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
android{
compileSdkVersion 19
buildToolsVersion "22.0.1"
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
lintOptions {
abortOnError false
}
compileOptions {
}
}
repositories{
mavenCentral()
maven {
url 'http://nexus.diamondfortress.com/nexus/content/repositories/releases'
}
maven {
url 'http://nexus.diamondfortress.com/nexus/content/repositories/snapshots'
}
}
dependencies{
compile 'com.dft.android:onyx-enroll-wizard:4.1.3'
}
**//project app:
build.grade:**
epositories{
mavenCentral()
}
apply plugin: 'com.android.application'
buildscript{
repositories {
mavenCentral() // or jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
}
}
dependencies{
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':onyxenrollwizardsampleapp')
}
android{
compileSdkVersion 19
buildToolsVersion "22.0.1"
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
allprojects {
repositories {
jcenter()
}
}
Getting Error:
Error:Failed to resolve: com.dft.android:onyx-enroll-wizard:4.1.3

At first modify your build.gradle
You can use apply plugin: 'com.android.application' instead of apply plugin: 'com.android.library'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "" // Set Yours
minSdkVersion 14
targetSdkVersion 22
}
Finally
apply plugin: 'com.android.application'
android{
compileSdkVersion 22
buildToolsVersion "22.0.1"
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
lintOptions {
abortOnError false
}
compileOptions {
}
}
repositories{
mavenCentral()
maven {
url 'http://nexus.diamondfortress.com/nexus/content/repositories/releases'
}
maven {
url 'http://nexus.diamondfortress.com/nexus/content/repositories/snapshots'
}
}
dependencies{
compile fileTree(dir: 'libs', include: '*.jar')
compile 'com.dft.android:onyx-enroll-wizard:4.1.3'
}
Then Build menu - Clear Project and Rebuild Project .

Related

How to configure build.gradle files of an existing project with tess-two lib?

For image processing i want to sync tessaract OCR in Android..i dont knw how to sync..!! when i tried to do some changes it shows "gradle sync failed"..
Here is setting.gradle and build.gradle
// setting.gradle:
include ':app'
include ':libraries:tess-two'
build.gradle of MyApplication:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.raghavan.myapplication"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
}
build.gradle of tess-two:
// 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:1.5.0'
// 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
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
apply plugin: 'android-library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 15
targetSdkVersion 23
}
sourceSets.main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
res.srcDirs = ['res']
jniLibs.srcDirs = ['libs']
}
}

Error:Cause: com.android.build.gradle.managed.ProductFlavor$Impl

When Android studio does Gradle sync, it has the following error message:
Gradle "MyApplication2" project refresh failed
Error:Cause: com.android.build.gradle.managed.ProductFlavor$Impl
After searching, still cannot get rid of it. Could you help? Thanks!
My project build.grade:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle-experimental:0.6.0-alpha3'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
My module build.gradle:
apply plugin: 'com.android.model.application'
model {
android {
compileSdkVersion = 23
buildToolsVersion = "23.0.1"
defaultConfig.with {
applicationId = "SamplePlayer"
minSdkVersion.apiLevel = 15
targetSdkVersion.apiLevel = 23
versionCode = 1
versionName = "1.0"
ndk {
moduleName "SamplePlayer"
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
jni.srcDirs = []
}
}
task ndkBuild(type: Exec) {
commandLine 'ndk-build', '-C', file('src/jni').absolutePath
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkBuild
}
android.lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles.add(file('proguard-android.txt'))
}
}
}
dependencies {
compile fileTree(dir: '../Jar', include: '*.jar')
compile fileTree(dir: 'libs', include: '*.jar')
}
My other module build.gradle:
apply plugin: 'com.android.model.application'
model {
android {
compileSdkVersion = 23
buildToolsVersion = "23.0.1"
defaultConfig.with {
applicationId = "com.example.cfcalex.myapplication2"
minSdkVersion.apiLevel = 22
targetSdkVersion.apiLevel = 23
versionCode = 1
versionName = "1.0"
}
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles.add(file('proguard-android.txt'))
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
}

unable to fix the project ,gradle issue

enter code hereunable to fix the project , new to android studio , need help fixing gradle my gradle file ,happening when i import projects from eclipse, exporting done fine
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
}
apply plugin: 'com.android.application'
dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
compile project(':ksoap2-android-assembly-2.5.8-jar-with-dependencies')
}
android {
compileSdkVersion 22
buildToolsVersion "23.0.1"
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
and the error i am getting is
Error:Configuration with name 'default' not found.
changed code
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.package.name"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
apply plugin: 'com.android.application'
dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
compile project(':ksoap2-android-assembly-2.5.8-jar-with-dependencies')
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.package.name"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
Add the defaultConfig into the android block
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.package.name"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
EDIT 1 : The android part of your gradle file should be inside the applications build.gradle not in the projects root gradle
There are two gradle files
Here is a sample Root Project Gradle file
// 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.0.0-alpha1'
// 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
}
Sample Module Gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.package.name"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.android.support:cardview-v7:23.1.1'
}

importing swipelistview error

I'm trying to import the swipelistview library to use on my project but I'm getting the following error.
http://i.imgur.com/ruxwkvv.png
I used this guide to get everything set up.
https://modewagon.wordpress.com/2013/09/16/getting-started-with-swipelistview/
I'm not sure exactly what the problem is or how I can fix it. Any help is appreciated.
This is the swipelistview build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
}
}
apply plugin: 'android-library'
dependencies {
compile 'com.android.support:support-v4:21.0.3'
compile files ('libs/nineoldandroids-2.4.0.jar')
}
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
and this is the one in my app folder:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.sda_app.sda"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
debug {
debuggable true
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile project(':libraries:swipelistview')
}

Android Studio, Gradle and Card.IO

I am not sure how to get my project to build Card.IO with Gradle. My gradle file looks as follows:
buildscript {
repositories {
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'crashlytics'
repositories {
maven { url 'http://download.crashlytics.com/maven' }
}
android {
compileSdkVersion 19
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "applicationId"
minSdkVersion 16
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:20.0.0'
compile 'com.crashlytics.android:crashlytics:1.+'
}
My local.properties are as follows:
sdk.dir=/Applications/Android Studio.app/sdk
ndk.dir=/Applications/Android Studio.app/android-ndk-r10b
And my Project structure is as follows:
Now according to Card.IO (https://github.com/card-io/card.io-Android-SDK) all I need to do is copy the files into the correct directory, but this is not working.
I have also looked at the following posts:
Card.IO on Android with Gradle
https://github.com/paypal/PayPal-Android-SDK/issues/26 - this suggests some extra gradle methods but does no work
When I do this to my Gradle file:
buildscript {
repositories {
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'crashlytics'
repositories {
maven { url 'http://download.crashlytics.com/maven' }
}
android {
compileSdkVersion 19
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "appId"
minSdkVersion 16
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
jniLibs.srcDir 'src/main/libs'
jni.srcDirs = [] //disable automatic ndk-build call
java.srcDirs = ['src/main/java', 'src-gen/main/java']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
productFlavors {
x86 {
versionCode Integer.parseInt("6" + defaultConfig.versionCode)
ndk {
abiFilter "x86"
}
}
mips {
versionCode Integer.parseInt("4" + defaultConfig.versionCode)
ndk {
abiFilter "mips"
}
}
armv7 {
versionCode Integer.parseInt("2" + defaultConfig.versionCode)
ndk {
abiFilter "armeabi-v7a"
}
}
arm {
versionCode Integer.parseInt("1" + defaultConfig.versionCode)
ndk {
abiFilter "armeabi"
}
}
fat
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:20.0.0'
compile 'com.crashlytics.android:crashlytics:1.+'
}
Then Card.IO works, but I get the error: Crashlytics couldn't find the res folder specified in sourceSets.main.res, please make one. It picked: src/main/res.
I am very sure my problem is just a misunderstanding on Gradle - I am new to it. But there are no up to date complete answers that I can look at.
Somewhere along the line I managed to delete my Res folder using some gradle settings. Now when I put the gradle file back and the res files back it all compiles fine. Weird.
Thank goodness for Android Studio's view local history or I would have been set back a couple of days!

Categories

Resources