teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

build.gradleの内容の追加

2018/08/21 04:24

投稿

salt35
salt35

スコア11

title CHANGED
File without changes
body CHANGED
@@ -2,6 +2,88 @@
2
2
  プロジェクトを作成したところ、ビルドが成功しません。
3
3
  解決策があればよろしくお願いします。
4
4
 
5
+ ## build.gradleの内容
6
+ ```app
7
+ apply plugin: 'com.android.application'
8
+
9
+ android {
10
+ compileSdkVersion 27
11
+ defaultConfig {
12
+ applicationId "jp.ac.denpa.design"
13
+ minSdkVersion 24
14
+ targetSdkVersion 27
15
+ versionCode 1
16
+ versionName "1.0"
17
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
18
+ }
19
+ buildTypes {
20
+ release {
21
+ minifyEnabled false
22
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23
+ }
24
+ }
25
+ }
26
+
27
+ allprojects {
28
+ repositories {
29
+ google()
30
+
31
+ // If you're using a version of Gradle lower than 4.1, you must instead use:
32
+ // maven {
33
+ // url 'https://maven.google.com'
34
+ // }
35
+ // An alternative URL is 'https://dl.google.com/dl/android/maven2/'
36
+ }
37
+ }
38
+
39
+ dependencies {
40
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
41
+ implementation 'com.android.support:appcompat-v7:27.0.2'
42
+ implementation 'com.android.support.constraint:constraint-layout:1.0.2'
43
+ testImplementation 'junit:junit:4.12'
44
+ androidTestImplementation 'com.android.support.test:runner:1.0.1'
45
+ androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
46
+ }
47
+
48
+ repositories {
49
+ maven {
50
+ url 'https://maven.google.com'
51
+ }
52
+ }
53
+
54
+ ```
55
+ ```AndoroidoStudioProjects
56
+ // Top-level build file where you can add configuration options common to all sub-projects/modules.
57
+
58
+ buildscript {
59
+
60
+ repositories {
61
+ google()
62
+ jcenter()
63
+ }
64
+ dependencies {
65
+ classpath 'com.android.tools.build:gradle:3.1.3'
66
+
67
+
68
+ // NOTE: Do not place your application dependencies here; they belong
69
+ // in the individual module build.gradle files
70
+ }
71
+ }
72
+
73
+ allprojects {
74
+ repositories {
75
+ google()
76
+ jcenter()
77
+ }
78
+ }
79
+
80
+ task clean(type: Delete) {
81
+ delete rootProject.buildDir
82
+ }
83
+
84
+ ```
85
+
86
+
5
87
  ## エラーメッセージ(Logcat)
6
88
  ```ここに言語を入力
7
89
  Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:27.0.2.