I read Sweet AlertDialog tutorial and I have added dependencies to my project this way:
select Build.Gradle (Module:app) and open
go to this line:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
and change to:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'cn.pedant.sweetalert:library:1.3'
}
Run the my app.but i get this error:
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.android.support:appcompat-v7:21.0.0.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/appcompat-v7/21.0.0/appcompat-v7-21.0.0.pom
https://jcenter.bintray.com/com/android/support/appcompat-v7/21.0.0/appcompat-v7-21.0.0.jar
file:/D:/sdk/ADT-Bundle-Windows-x86-20140702.Full_p30download.com/sdk/extras/android/m2repository/com/android/support/appcompat-v7/21.0.0/appcompat-v7-21.0.0.pom
file:/D:/sdk/ADT-Bundle-Windows-x86-20140702.Full_p30download.com/sdk/extras/android/m2repository/com/android/support/appcompat-v7/21.0.0/appcompat-v7-21.0.0.jar
file:/D:/sdk/ADT-Bundle-Windows-x86-20140702.Full_p30download.com/sdk/extras/google/m2repository/com/android/support/appcompat-v7/21.0.0/appcompat-v7-21.0.0.pom
file:/D:/sdk/ADT-Bundle-Windows-x86-20140702.Full_p30download.com/sdk/extras/google/m2repository/com/android/support/appcompat-v7/21.0.0/appcompat-v7-21.0.0.jar
Required by:
MyApplication:app:unspecified > cn.pedant.sweetalert:library:1.3 > com.pnikosis:materialish-progress:1.0
And when i add appcompat-v7-21.0.0.jar i get this error:
Error:Failed to find: com.android.support:appcompat-v7:21.0.0
Open File<br>Open in Project Structure dialog
Remove appcompat-v7-21.0.0.jar first, then try replace your dependencies with the following:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'cn.pedant.sweetalert:library:1.3'
}
If its a case of missing support library, I think you need to download Android Support Repository from the
Android SDK Manager->SDK Tools->Support Repository->Android Support Repository.
Related
I'm trying to use a Navigation Drawer, but I can't because I get the error:
Error:A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find any version that matches com.android.support:design:21.+.
Versions that do not match:
26.0.0-alpha1
25.3.1
25.3.0
25.2.0
25.1.1
+ 21 more
Required by:
project :app
On gradle I have:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:support-v4:21.0.3'
compile 'com.android.support:design:21.+'
}
Can you please help me?
Try using this:
compile 'com.android.support:design:21.0.3'
Or:
compile 'com.android.support:appcompat-v7:21.+'
compile 'com.android.support:support-v4:21.+'
compile 'com.android.support:design:21.+'
Why gradle trys to download dependencies again, when it downloaded them in past?
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.androied.support:appcompat-v7:23.0.1'
//compile 'com.nineoldandroids:library:2.4.0'
compile 'com.android.support:cardview-v7:23.0.1'
compile project(':sweetsheet')
compile files('libs/bolts-tasks-1.3.0.jar')
}
the error:
Error:(30, 13) Failed to resolve: com.androied.support:appcompat-v7:23.0.1
Show in File<br>Show in Project Structure dialog
I'm not online all the time. I downloaded the appcompat-v7:
screenshot of downloaded appcompat-v7
You have a typo.
com.androi e d.support:appcompat-v7:23.0.1 instead of
com.android.support:appcompat-v7:23.0.1
You can change gradle settings in the android studio
Go to settings and type gradle then you can tick gradle offline work and the gradle is not going download dependencies every time.
I am trying to sync Gradle with the following dependencies
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.google.android.gms:play-services:7.0.0' }
but its giving following error
after clicking on the link provided in the screenshot it opens and say the following
I'm not able to solve this problem.
My Android Repo and all support library is updated.
TIA
Android Studio 1.3 generate a build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
}
but I want use com.android.support:appcompat-v7:19.1, when I type this, it tips Failed to resolve: com.android.support:appcompat-v7:19.1
How can I use appcompat-v7 with lower version ?
Add the dependency to {project}/build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:19.1.+'
}
Click the Sync Project with Gradle Files button.
I hope it helps you.
For more info please visit:
https://developer.android.com/tools/support-library/features.html
Try using:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:19.1.+'
}
Also ensure that you have those libraries installed.
Gradle build error - more than one library with package name android.support.v7.appcompat. This project has Chrome Cast in it, so is using android-support-v7-appcompat and CastCompanionLibary-android-master. Project structure is the following:
BaseGameUtils
CastCompanionLibrary-android-master
VideoBrowserActivity
android-support-v7-appcompat
android-support-v7-mediarouter
google-play-services_lib
Really tough error because the compiler doesn't give much information other than 'more than one library with package name 'android.support.v7.appcompat'. Understand why you don't want to be using different versions of the same library, but why doesn't the compiler reveal what versions are being used, and where they are being called from?
Trying to add leaderboard similar to type-a-number challenge (github example project)
There are a total of (7) build.gradle files. One for the top level and one for each of the packages listed above. Top level gradle file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
}
BaseGameUtils:
dependencies {
compile 'com.android.support:appcompat-v7:20.0.+'
compile 'com.android.support:support-v4:20.0.+'
compile 'com.google.android.gms:play-services-games:6.5+'
compile 'com.google.android.gms:play-services-plus:6.5+'
compile 'com.google.android.gms:play-services-appstate:6.5+'
}
CastCompanionLibrary-android-master
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile 'com.android.support:appcompat-v7:20.0.+'
compile project(':android-support-v7-mediarouter')
compile 'com.google.android.gms:play-services-cast:6.5+'
compile project(':BaseGameUtils')
}
VideoBrowserActivity
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':CastCompanionLibrary-android-master')
}
android-support-v7-appcompat
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
android-support-v7-mediarouter
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':android-support-v7-appcompat')
}
google-play-services_lib
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
Any help is appreciated on this.
Just go through you project's libs folder not from the Android Studio but from you windows explorer/finder (for windows)/(for mac). And search for android.support.v7.appcompat. Any evidence found related to Apcompat (whether it is v4 or v7) is recommended to be deleted.
Hopefully your problem will be solved.
In your libs folder dont miss any sub directory that has libs folder.
Follow the Steps
1) Remove This repository:
implementation 'com.android.support:appcompat-v7:28.0.0'
2) Add This Repository
implementation 'com.android.support:support-v4:21.0.3'
compile group: 'com.android.support', name: 'appcompat-v7', version: '26.0.1'
3) That's It You Are Ready To Go