Error:A problem occurred configuring project ':app'.
错误:配置项目':app'时发生问题。
Could not find support-v4.jar (com.android.support:support-v4:24.0.0). Searched in the following locations: https://jcenter.bintray.com/com/android/support/support-v4/24.0.0/support-v4-24.0.0.jar
找不到support-v4。jar(com.android.support:support-v4:24.0.0)。在以下位置搜索:https://jcenter.bintray.com/com/android/support/support-v4/24.0 /support-v4-24.0. jar
MY SDK Tool is like this image
我的SDK工具是这样的
And my Gradle is
我的它是
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 24
buildToolsVersion "24"
dexOptions {
javaMaxHeapSize "4g" //specify the heap size for the dex process
preDexLibraries = false //delete the already predexed libraries
}
defaultConfig {
applicationId "com.lionvisionsits.kkasons"
minSdkVersion 19
targetSdkVersion 24
multiDexEnabled false
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0'
compile('com.digits.sdk.android:digits:2.0.0@aar') {
transitive = true;
}
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.android.support:recyclerview-v7:24.0.0'
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile 'com.android.support:multidex:1.0.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.google.code.gson:gson:2.4'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'com.google.firebase:firebase-messaging:9.4.0'
compile 'ch.acra:acra:4.9.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'me.relex:circleindicator:1.2.1@aar'
compile 'com.github.arimorty:floatingsearchview:2.0.3'
compile('com.digits.sdk.android:digits:2.0.0@aar') {
transitive = true;
}
compile 'com.android.support:support-v4:24.0.0'
}
apply plugin: 'com.google.gms.google-services'
can anyone help me?
谁能帮我吗?
After Updating to v24.2.1 i get this error in debug\AndroidMenifest.xml
更新到v24.2.1后,我在调试\AndroidMenifest.xml中得到这个错误。
Thanks & Regards Jay
谢谢&视杰
5 个解决方案
#1
5
I had the same problem, i updated :
我也有同样的问题,我更新了:
classpath 'com.android.tools.build:gradle:2.+'
and my gradle wrapper
和我gradle包装
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
and it works
和它的工作原理
#2
2
I was having the same issue, the following steps fixed my probelm. Give it try and see if it helps:
我也有同样的问题,以下步骤解决了我的问题。试一试,看看是否有用:
Go to "File" -> "Project Structure...".
点击“文件”->“项目结构…”
Select "your project" under "Modules" and click on "Dependencies" tab.
在“模块”下选择“您的项目”,然后单击“Dependencies”选项卡。
Click on the "+" sign and select "1 Library dependency".
单击“+”标志并选择“1库依赖项”。
In the new popup window, select "support-v4" and click "OK".
在新的弹出窗口中,选择“support-v4”并单击“OK”。
#3
0
Maybe the version of com.android.support:support-v4:24.0.0
is different to the android studio. You can try to do like this: File-> project structure->app->dependencies->+->Library dependency
, the select the com.android.support:support-v4:xx.x.x
. If any problem, you can change the library to the lastest.
支持:support-v4:24.0与android studio不同。您可以尝试这样做:File->项目结构->应用程序->依赖项->+->库依赖项,选择com.android.support:support-v4: xxx .x.x。如果有任何问题,您可以将库更改为最新的。
#4
0
try this inside in android
block
在android程序块中试试这个。
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
Or if you have model
block then try this
如果你有模型块,试试这个
compileOptions.with {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
#5
0
There is no use of buildVersionCode
or name
required in AndroidManifest.xml
. You can better define it in app build.gradle
file. Like below:
在AndroidManifest.xml中不需要使用buildVersionCode或name。你可以在应用程序构建中更好地定义它。gradle文件。像下图:
defaultConfig {
applicationId "com.example.r"
minSdkVersion 15
versionCode 418
versionName "4.4.0"
}
#1
5
I had the same problem, i updated :
我也有同样的问题,我更新了:
classpath 'com.android.tools.build:gradle:2.+'
and my gradle wrapper
和我gradle包装
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
and it works
和它的工作原理
#2
2
I was having the same issue, the following steps fixed my probelm. Give it try and see if it helps:
我也有同样的问题,以下步骤解决了我的问题。试一试,看看是否有用:
Go to "File" -> "Project Structure...".
点击“文件”->“项目结构…”
Select "your project" under "Modules" and click on "Dependencies" tab.
在“模块”下选择“您的项目”,然后单击“Dependencies”选项卡。
Click on the "+" sign and select "1 Library dependency".
单击“+”标志并选择“1库依赖项”。
In the new popup window, select "support-v4" and click "OK".
在新的弹出窗口中,选择“support-v4”并单击“OK”。
#3
0
Maybe the version of com.android.support:support-v4:24.0.0
is different to the android studio. You can try to do like this: File-> project structure->app->dependencies->+->Library dependency
, the select the com.android.support:support-v4:xx.x.x
. If any problem, you can change the library to the lastest.
支持:support-v4:24.0与android studio不同。您可以尝试这样做:File->项目结构->应用程序->依赖项->+->库依赖项,选择com.android.support:support-v4: xxx .x.x。如果有任何问题,您可以将库更改为最新的。
#4
0
try this inside in android
block
在android程序块中试试这个。
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
Or if you have model
block then try this
如果你有模型块,试试这个
compileOptions.with {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
#5
0
There is no use of buildVersionCode
or name
required in AndroidManifest.xml
. You can better define it in app build.gradle
file. Like below:
在AndroidManifest.xml中不需要使用buildVersionCode或name。你可以在应用程序构建中更好地定义它。gradle文件。像下图:
defaultConfig {
applicationId "com.example.r"
minSdkVersion 15
versionCode 418
versionName "4.4.0"
}