2017-07-24 164 views
0
apply plugin: 'com.android.application' 

android { 
compileSdkVersion 25 
buildToolsVersion "26.0.0" 
defaultConfig { 
    applicationId "com.example.andt.projectalpha" 
    minSdkVersion 22 
    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' 
    } 
} 
} 

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-alpha1' 
testCompile 'junit:junit:4.12'} 

有一个错误在该行错误在编译编译版本

compile 'com.android.support:appcompat-v7:25.3.1' 

建议的解决办法是让所有的版本一样的,所以我做到了。但仍然存在错误。

悬停在声明中说: “找到的版本25.3.1,25.0.0”

+0

你可以添加完整的build.gradle吗? –

+0

@BrunoFerreira我已经添加了。 –

回答

0

改变一切依赖于26.0.0-β1

例如

implementation 'com.android.support:appcompat-v7:26.0.0-beta1' 

compileSdkVersion 25 (to 26) 
targetSdkVersion 25 (to 26) 
+0

这样做了,现在Android Studio无法找到存储库。点击** Install Repository和Sync Project **似乎不起作用。 –

+0

你可以做出全新的项目,并尝试如果一切都在那里工作 –

+0

是的,我做到了。感谢您的建议。 –