Android Studio: Where is the compiler error output window?

When I run my project in Android Studio, in the Messages window, I get:

Gradle: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':play01:compileDebug'. > Compilation failed; see the compiler error output for details. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 

It says > Compilation failed; see the compiler error output for details. > Compilation failed; see the compiler error output for details. So where is the "compiler error"? And / Or how do I work with the --stacktrace option?

+254
android-studio gradle
May 19 '13 at 11:05
source share
15 answers

This answer is deprecated. For Android 3.1 Studio, go to this answer

One thing you can do is disable the external assembly. To do this, click the "compiler settings icon" in the "Messages" panel, which appears when an error occurs. You can also open the compiler settings by selecting "File" → "Settings" → "Compiler". (Thanx to @maxgalbu for this tip).

enter image description here

Uncheck "Use external assembly"

enter image description here

And you will see errors in the console

EDIT: after returning to the “internal assembly” again, you may receive some errors, you can solve them as follows: Android Studio: disable the “external assembly” to display the error output create duplicate class errors

+53
Jun 01 '13 at 20:32
source share

For Android Studio 3.1, select the icon below Build in the Build window.

Android Studio 3.1 raw log toggle button

In Android Studio 3.3 (possibly in 3.2.1) the icon has changed, although the location remains the same:

Android Studio 3.3 raw log toggle button

The build window should open when the build action starts (for example, from the Build menu). If you do not see this, you can try clicking the Build button at the bottom of the window (also visible in the screenshots above) or through the menu View → Windows Tools → Build.

+480
Dec 28 '17 at 10:04 on
source share

It is really easy to set up! Just go to the compiler settings in Android Studio 2.2.3 and install the --stacktrace command:

Compiler settings to add --stacktrace command

Then run the application again

+35
Jan 26 '17 at 5:31 on
source share

Are you on windows? Run cmd, find your project folder and run "gradlew build". This should already give you more information than the IDE, you can also use -info, -stacktrace and -debug.

+31
May 19 '13 at 11:46
source share

You can also see the error in the build window by clicking on the switch button.

enter image description here

+17
Jul 07 '18 at 13:16
source share

In my case, I prefer to open a terminal window in the lower left corner and run gradlew build --info :

enter image description here

+13
May 19 '16 at 1:00
source share

In android studio 2.2.3 you can find the output in gradle console as below gradle console

+10
Dec 09 '16 at 8:22
source share

I built what Jorge recommended. Goto File-> Settings-> Compiler.

Here you will see a field for adding compiler options, where you connect --stacktrace

+7
Feb 06 '16 at 7:08
source share

In my case, I had a findViewById link to a view that I deleted in xml

if you are using AS 3.1 and above:

  1. go to Settings> Build, Run, and Deploy>
  2. add --stacktrace to the command line options, click "Apply" and "OK"
  3. At the bottom of AS, click Console / Build (if you are using stable version 3.1.2 and higher), expand the panel and run the application again.

you should see the full stack in the expanded view and the specific error.

+2
May 05 '18 at 10:00
source share

To run

 gradlew --stacktrace 

in the terminal to see the full report

for me it was

Task: app: compileDebugJavaWithJavac FAILED javacTask: source release 1.8 requires target release 1.8

so i added

  compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } 

in the app.gradle / android file and build completed successfully

+2
Dec 27 '18 at 22:16
source share

If you are in android studio 3.1, make sure file-> Project Structure → Initial compatibility is empty. it should not have 1.8 sets.

then click ok, the project will be synchronized and the error will disappear.

+1
Apr 3 '18 at 15:01
source share

after convert android to android.

edit Import library problem will solve How it:

 import androidx.appcompat.widget.Toolbar; << like this 

import androidx.annotation.NonNull; << like that

import androidx.appcompat.app.ActionBarDrawerToggle; << like that

import androidx.drawerlayout.widget.DrawerLayout; << like that

import androidx.recyclerview.widget.RecyclerView; << like that

import androidx.appcompat.app.AppCompatActivity; << like that

0
Apr 28 '19 at 9:43
source share

I solved this error "Compilation could not see the output of the compiler error for details"

The solution is very simple: add a gradle below the line of code

implementation of "com.google.android.gms: play-services-ads: 15.0.0"

0
May 07 '19 at 9:56
source share

I solved this error "Compilation could not see the output of the compiler error for details"

Add the implementation line of the com.google.android.gms code in Gradle below: play-services-ads: 15.0.0

0
May 08 '19 at 16:42
source share

you need to add this to the build.gradle file

 dependencies { compile fileTree(dir: 'libs', include: '*.jar') } 

enter image description here

-12
Jul 31 '13 at 13:17
source share



All Articles