Cannot resolve syymbol 'build' on line import com.android.build.OutputFile in app/build.gradle

Multi tool use
up vote
4
down vote
favorite
So I just created a react native project using the command
react-native init "project-name"
I went into the app level build.gradle to connect firebase and I had an error saying could not resolve symbol 'android' on the line
import com.android.build.OutputFile
However it popped up saying "android framework is detected in the project click to configure" so I did this, but then it said cannot resolve symbol 'build' on the same line, I have no idea why it's saying this as I have made project the same way before and never had this problem, any ideas?


add a comment |
up vote
4
down vote
favorite
So I just created a react native project using the command
react-native init "project-name"
I went into the app level build.gradle to connect firebase and I had an error saying could not resolve symbol 'android' on the line
import com.android.build.OutputFile
However it popped up saying "android framework is detected in the project click to configure" so I did this, but then it said cannot resolve symbol 'build' on the same line, I have no idea why it's saying this as I have made project the same way before and never had this problem, any ideas?


Where is thisimport
line? What file?
– Code-Apprentice
Oct 4 '16 at 0:20
It's in the app level build.gradle, android/app/build.gradle
– Dfarrelly
Oct 4 '16 at 0:24
Have you tried cleaning (Build->Clean) and rebuilding the project (Build->Rebuild Project) in Android Studio?
– George
Oct 4 '16 at 11:38
I got the same issue. Did you find out how to solve it?
– arne.z
Oct 16 '17 at 16:54
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
So I just created a react native project using the command
react-native init "project-name"
I went into the app level build.gradle to connect firebase and I had an error saying could not resolve symbol 'android' on the line
import com.android.build.OutputFile
However it popped up saying "android framework is detected in the project click to configure" so I did this, but then it said cannot resolve symbol 'build' on the same line, I have no idea why it's saying this as I have made project the same way before and never had this problem, any ideas?


So I just created a react native project using the command
react-native init "project-name"
I went into the app level build.gradle to connect firebase and I had an error saying could not resolve symbol 'android' on the line
import com.android.build.OutputFile
However it popped up saying "android framework is detected in the project click to configure" so I did this, but then it said cannot resolve symbol 'build' on the same line, I have no idea why it's saying this as I have made project the same way before and never had this problem, any ideas?




asked Oct 3 '16 at 22:40
Dfarrelly
8019
8019
Where is thisimport
line? What file?
– Code-Apprentice
Oct 4 '16 at 0:20
It's in the app level build.gradle, android/app/build.gradle
– Dfarrelly
Oct 4 '16 at 0:24
Have you tried cleaning (Build->Clean) and rebuilding the project (Build->Rebuild Project) in Android Studio?
– George
Oct 4 '16 at 11:38
I got the same issue. Did you find out how to solve it?
– arne.z
Oct 16 '17 at 16:54
add a comment |
Where is thisimport
line? What file?
– Code-Apprentice
Oct 4 '16 at 0:20
It's in the app level build.gradle, android/app/build.gradle
– Dfarrelly
Oct 4 '16 at 0:24
Have you tried cleaning (Build->Clean) and rebuilding the project (Build->Rebuild Project) in Android Studio?
– George
Oct 4 '16 at 11:38
I got the same issue. Did you find out how to solve it?
– arne.z
Oct 16 '17 at 16:54
Where is this
import
line? What file?– Code-Apprentice
Oct 4 '16 at 0:20
Where is this
import
line? What file?– Code-Apprentice
Oct 4 '16 at 0:20
It's in the app level build.gradle, android/app/build.gradle
– Dfarrelly
Oct 4 '16 at 0:24
It's in the app level build.gradle, android/app/build.gradle
– Dfarrelly
Oct 4 '16 at 0:24
Have you tried cleaning (Build->Clean) and rebuilding the project (Build->Rebuild Project) in Android Studio?
– George
Oct 4 '16 at 11:38
Have you tried cleaning (Build->Clean) and rebuilding the project (Build->Rebuild Project) in Android Studio?
– George
Oct 4 '16 at 11:38
I got the same issue. Did you find out how to solve it?
– arne.z
Oct 16 '17 at 16:54
I got the same issue. Did you find out how to solve it?
– arne.z
Oct 16 '17 at 16:54
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
Try double click on build word in your code such as Build.VERSION, not in the import com.android.build.OutputFile
. then if it show press ALT + Enter, you should do it.
add a comment |
up vote
0
down vote
Be sure you have classpath 'com.android.tools.build:gradle:2.2.0'
in the dependencies
block of your app level build.gradle file.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Try double click on build word in your code such as Build.VERSION, not in the import com.android.build.OutputFile
. then if it show press ALT + Enter, you should do it.
add a comment |
up vote
1
down vote
Try double click on build word in your code such as Build.VERSION, not in the import com.android.build.OutputFile
. then if it show press ALT + Enter, you should do it.
add a comment |
up vote
1
down vote
up vote
1
down vote
Try double click on build word in your code such as Build.VERSION, not in the import com.android.build.OutputFile
. then if it show press ALT + Enter, you should do it.
Try double click on build word in your code such as Build.VERSION, not in the import com.android.build.OutputFile
. then if it show press ALT + Enter, you should do it.
edited 2 days ago


Billal Begueradj
5,501132637
5,501132637
answered Jul 25 at 7:00
Pangeran Zuckerberg
3116
3116
add a comment |
add a comment |
up vote
0
down vote
Be sure you have classpath 'com.android.tools.build:gradle:2.2.0'
in the dependencies
block of your app level build.gradle file.
add a comment |
up vote
0
down vote
Be sure you have classpath 'com.android.tools.build:gradle:2.2.0'
in the dependencies
block of your app level build.gradle file.
add a comment |
up vote
0
down vote
up vote
0
down vote
Be sure you have classpath 'com.android.tools.build:gradle:2.2.0'
in the dependencies
block of your app level build.gradle file.
Be sure you have classpath 'com.android.tools.build:gradle:2.2.0'
in the dependencies
block of your app level build.gradle file.
answered Oct 4 '16 at 0:29
Code-Apprentice
46.1k1486164
46.1k1486164
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f39841532%2fcannot-resolve-syymbol-build-on-line-import-com-android-build-outputfile-in-ap%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
S0yp,kNT iqu,5QxN2UXhCWY4oVL3,G0,7qz4py05pep6hf,gJQsEcM9ZAVi6NfVvSdJ5VL
Where is this
import
line? What file?– Code-Apprentice
Oct 4 '16 at 0:20
It's in the app level build.gradle, android/app/build.gradle
– Dfarrelly
Oct 4 '16 at 0:24
Have you tried cleaning (Build->Clean) and rebuilding the project (Build->Rebuild Project) in Android Studio?
– George
Oct 4 '16 at 11:38
I got the same issue. Did you find out how to solve it?
– arne.z
Oct 16 '17 at 16:54