プロジェクトレベルのファイル:すべてのサブプロジェクト/モジュールに共通の設定オプションを追加できるトップレベルのビルドファイル。Android Studioの新しいプロジェクトの作成時にシンボルappCompatActivityを解決できませんか?
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
// 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
}
モジュールレベルのGradle:私はこの質問を知って
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "in.co.persistent.gamedisappear"
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'
}
}
}
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:25.0.1'
testCompile 'junit:junit:4.12'
}
` が、私は無効化など、さまざまなものを試してみましたが、多くのtimes.Butを頼まれる/ cache.Alsoがアンドロイドを再起動し、新しいプロジェクトを構築しようとした再起動.Plusは必要な依存関係を追加しました( 'com.android.support:appcompat-v7:25.0.1'をコンパイルしてください)何も動作しません!
あなたのアプリのエラーコードとグラデルプロパティを投稿してください:) –
私はエラーの画像を添付しました! – Delfin
build.gradleファイルを投稿してください。 – TheAnonymous010