33

Building an app in Android Studio. In the logcat I get an infinite display of:

"I/art: Enter while loop."

The app works like a charm but it still looks weird. On Google I couldn't find anything and here on stack I found one reference with a very specific situation and a very specific solution.

Problem is that in my case it even shows up when I just run an 'empty activity' on my phone.

Currently using: API 19: Android 4.4 (KitKat) but have also tried on higher API's.

If any other files (gradle/manifest) are needed please let me know, hope someone can tell me whats going on (or maybe this is even normal?).

Thanks.

JAVA file

package com.example.xxxxxxx.myapplication;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}

XML file

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.xxxxxxx.myapplication.MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</android.support.constraint.ConstraintLayout>

Logcat

W/System: ClassLoader referenced unknown path: /data/app/com.example.xxxxxxx.myapplication-1/lib/arm
I/InstantRun: starting instant run server: is main process
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
I/art: Enter while loop.
V/PhoneWindow: DecorView setVisiblity: visibility = 4, Parent = null, this = DecorView@a600dae[]
D/WindowClient: Add to mViews: DecorView@a600dae[MainActivity], this = android.view.WindowManagerGlobal@19554c2
D/OpenGLRenderer: Dumper init 2 threads <0xa132b480>
D/OpenGLRenderer: <com.example.xxxxxxx.myapplication> is running.
D/OpenGLRenderer: CanvasContext() 0x9fdc1800
D/GraphicBuffer: register, handle(0x9fd86870) (w:576 h:576 s:576 f:0x1 u:0x000100)
D/ViewRootImpl[MainActivity]: hardware acceleration is enabled, this = ViewRoot{c7462d3 com.example.xxxxxxx.myapplication/com.example.xxxxxxx.myapplication.MainActivity,ident = 0}
V/PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = ViewRoot{c7462d3 com.example.xxxxxxx.myapplication/com.example.xxxxxxx.myapplication.MainActivity,ident = 0}, this = DecorView@a600dae[MainActivity]
D/Surface: Surface::allocateBuffers(this=0x94d6d700)
D/OpenGLRenderer: CanvasContext() 0x9fdc1800 initialize window=0x94d6d700, title=com.example.xxxxxxx.myapplication/com.example.xxxxxxx.myapplication.MainActivity
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
D/OpenGLRenderer: Created EGL context (0xaa2bdb80)
D/OpenGLRenderer: ProgramCache.init: enable enhancement 1
I/OpenGLRenderer: Get disable program binary service property (0)
I/OpenGLRenderer: Initializing program atlas...
I/ProgramBinary/Service: ProgramBinaryService client side disable debugging.
I/ProgramBinary/Service: ProgramBinaryService client side disable binary content debugging.
D/ProgramBinary/Service: BpProgramBinaryService.getReady
D/ProgramBinary/Service: BpProgramBinaryService.getProgramBinaryData
I/OpenGLRenderer: Program binary detail: Binary length is 91876, program map length is 124.
I/OpenGLRenderer: Succeeded to mmap program binaries. File descriptor is 65, and path is /dev/ashmem.
I/OpenGLRenderer: No need to use file discriptor anymore, close fd(65).
D/OpenGLRenderer: Initializing program cache from 0x0, size = -1
I/[MALI][Gralloc]: dlopen libsec_mem.so fail
D/Surface: Surface::connect(this=0x94d6d700,api=1)
W/libEGL: [ANDROID_RECORDABLE] format: 1
D/Surface: Surface::setBufferCount(this=0x94d6d700,bufferCount=4)
W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
V/InputMethodManager: onWindowFocus: null softInputMode=288 first=true flags=#81810100
D/GraphicBuffer: register, handle(0x9fd86bf0) (w:480 h:800 s:480 f:0x1 u:0x000f02)
D/OpenGLRenderer: CacheTexture 3 upload: x, y, width height = 0, 0, 1024, 155
D/OpenGLRenderer: ProgramCache.generateProgram: 0
D/OpenGLRenderer: ProgramCache.generateProgram: 34359738371
D/OpenGLRenderer: ProgramCache.generateProgram: 240518168576
I/art: Enter while loop.
I/art: Enter while loop.
I/art: Enter while loop.
I/art: Enter while loop.
I/art: Enter while loop.
I/art: Enter while loop.
I/art: Enter while loop.
I/art: Enter while loop.
I/art: Enter while loop.
I/art: Enter while loop.
I/art: Enter while loop.
I/art: Enter while loop.
.... etc.

MANIFEST

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.xxxxxxx.myapplication">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

GRADLE

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "com.example.xxxxxxx.myapplication"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
}
tjtdroid
  • 331
  • 3
  • 4

2 Answers2

1

Though I don't see evident reasons for the problem in your empty Activity, in my case it was some logics excessively repeated many times and overloading Android Runtime what made screen be held for some time and a I/art: Enter while loop. message in console logs.

The problem was solved by reducing logics to only one pass. You can also try doing it on a separate thread.

Zon
  • 18,610
  • 7
  • 91
  • 99
0

It looks like it's some kind of debugging message what was left in Android Studio or some of the dependencies your software has.

You should try to update every library, the Android Studio and it's components to latest version and that will solve the issue.

gyurix
  • 1,106
  • 9
  • 23