質問編集履歴

2

試したことを追加

2015/08/11 05:29

投稿

tetsukay
tetsukay

スコア232

test CHANGED
File without changes
test CHANGED
@@ -73,3 +73,55 @@
73
73
  }
74
74
 
75
75
  ```
76
+
77
+
78
+
79
+ 試してダメだったこと
80
+
81
+
82
+
83
+ ```
84
+
85
+ // build.gradleのandroidブロックに以下を追加
86
+
87
+ compileOptions {
88
+
89
+ sourceCompatibility JavaVersion.VERSION_1_6
90
+
91
+ targetCompatibility JavaVersion.VERSION_1_6
92
+
93
+ }
94
+
95
+ ```
96
+
97
+
98
+
99
+ ```
100
+
101
+ // build.gradleのandroidブロックに以下を追加
102
+
103
+ sourceCompatibility 1.6
104
+
105
+ targetCompatibility 1.6
106
+
107
+
108
+
109
+ // 似たような感じで以下の指定方法も試した
110
+
111
+ sourceCompatibility '1.6'
112
+
113
+ targetCompatibility '1.6'
114
+
115
+
116
+
117
+ sourceCompatibility = 1.6
118
+
119
+ targetCompatibility = 1.6
120
+
121
+
122
+
123
+ sourceCompatibility = '1.6'
124
+
125
+ targetCompatibility = '1.6'
126
+
127
+ ```

1

build.gradleの内容を記載

2015/08/11 05:29

投稿

tetsukay
tetsukay

スコア232

test CHANGED
File without changes
test CHANGED
@@ -31,3 +31,45 @@
31
31
  というビルドエラーでビルドできません.
32
32
 
33
33
  とりあえずコマンドラインでもビルドさせたいのですが,JAVA_HOMEを1.6に書き換えずに,このアプリだけ 1.6 でビルドさせるような指定は可能でしょうか?
34
+
35
+
36
+
37
+ build.gradle
38
+
39
+ ```
40
+
41
+ apply plugin: 'com.android.application'
42
+
43
+
44
+
45
+ android {
46
+
47
+ compileSdkVersion 19
48
+
49
+ buildToolsVersion "22.0.1"
50
+
51
+
52
+
53
+ defaultConfig {
54
+
55
+ applicationId "com.app"
56
+
57
+ minSdkVersion 15
58
+
59
+ targetSdkVersion 15
60
+
61
+ }
62
+
63
+
64
+
65
+ apply from: '../.gradle.settings/signingConfigs.debug.gradle', to: android
66
+
67
+ apply from: '../.gradle.settings/buildTypes.debug.gradle', to: android
68
+
69
+ apply from: '../.gradle.settings/packagingOptions.gradle', to: android
70
+
71
+ apply from: '../.gradle.settings/lintOptions.gradle', to: android
72
+
73
+ }
74
+
75
+ ```