Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to let AndroidStudio show all compile errors at once?

Reluctantly I turned from Eclipse to AndroidStudio for developing apps (only for that). What is really annoying to me is that AndroidStudio does not show all compile errors at once or I haven't found the right option till now.

Given these stupid classes first everything is fine:

A.kt

package so

class A(val a: Int) {

    fun add(b: Int): Int {
        return a + b
    }
}

B.kt

package so

class B {

    fun foo() {
        val a = A(1)
        val c = a.add(2)
    }
}

C.kt

package so

class C {

    fun bar() {
        val a = A(3)
        val c = a.add(4)
    }
}

Now, if I'm in A and by mistake remove a letter from method name add so its name becomes ad. Then, no error is shown in B or C:

enter image description here

Neither Build > Make Project nor Build > Rebuild Project mark the errorneous classes though they are listed in the compile log:

enter image description here

Only if opening B or C in the editor the buggy class are underlined in red.

enter image description here

Sometimes I detect syntax errors a long while after changing some code at another place.

Is there any solution for this, any option I have overseen?

like image 997
yasd Avatar asked Apr 14 '18 19:04

yasd


1 Answers

That's a known issue. Some versions of Kotlin hide build errors in some releases of Android Studio. Thus, Android Studio frustratingly doesn't display them in the Messages tab. But you can still find all the errors – you have to open the Gradle Console to get to them.

Hope this will be fixed in a future releases of AS.

like image 163
Andy Jazz Avatar answered Sep 22 '22 17:09

Andy Jazz