Jajan
Jajan

Reputation: 926

Android studio throws "Too much output to process error" on debug

Android studio throws "Too much output to process error" on debug.

I just started working on android development and trying to debug using my nexus 5 as a connected device.

Being a novice, I thought it was a memory issue and even closed all the background applications. In my single activity I am just displaying a background image and a button.

Please have a look at the layout xml...

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgroundimage"
android:weightSum="5"
android:orientation="vertical">

<LinearLayout
    android:layout_height="0dp"
    android:layout_width="match_parent"
    android:layout_weight="1"
    android:background="#C9BDBD"
    android:padding="5dp">

    <Button
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:textSize="20dp"
        android:background="#6C7B8B"
        android:textColor="#000000"
        android:text="Become An Android Developer"
        android:onClick="Congratulations!!! You are now initiated.."/>

</LinearLayout>

Upvotes: 0

Views: 5030

Answers (3)

Hassam Bin Hassan
Hassam Bin Hassan

Reputation: 419

You may have selected "No Filters" in android monitor which causes "Too much output to process error", Change it to "Show only selected Application" then all other Log line are filtered and will not show in Logcat.

Here is snapshot of Android Monitor

Upvotes: 0

Rusheel Jain
Rusheel Jain

Reputation: 843

As far as "too much output..." issue is concerned, you can mostly ignore it. Still it would make sense if you remove some of the really unnecessary Log lines from your code, especially from methods that are called repeatedly and frequently.

Another thing, i believe you want to show a text "Congratulations!!! You are now initiated.." when user clicks on button. So change your xml's android:onClick to android:onClick= "myButtonClicked"

In the activity, implement this function

public void myButtonClicked(){

}

Finally, show the text "Congratulations!!! You are now initiated.." either via dialog (e.g. alertDialog) or in some textView

Upvotes: 1

Shahar
Shahar

Reputation: 3692

your Button's android:onClick should be a method in the Java code.

<Button
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:textSize="20dp"
    android:background="#6C7B8B"
    android:textColor="#000000"
    android:text="Become An Android Developer"
    android:onClick="Congratulations!!! You are now initiated.."/>

something like

android:onClick="doSomthing"/>

and in the Java code:

public void doSomthing(View v){
...
...
...
}

Upvotes: 1

Related Questions