Basically I'm trying to learn java and android app development. Recently I created a new project and designed a simple layout with a button in it and loaded it with main activity.
Now I'm getting following errors without even implementing button function and stuff etc.. it's just loading and displaying layout but it is taking too much time. For example: when i load it on simulator or on my person device.. it takes about 10 seconds to load and then when i click a button application skips frames..
01/08 09:19:48: Launching app
No apk changes detected since last installation, skipping installation of C:\Users\nouma\AndroidStudioProjects\MediEase\app\build\outputs\apk\app-debug.apk
$ adb shell am force-stop com.example.nouma.mediease
$ adb shell am start -n "com.example.nouma.mediease/com.example.nouma.mediease.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 3520 on device Nexus_5X_API_23 [emulator-5554]
W/System: ClassLoader referenced unknown path: /data/app/com.example.nouma.mediease-2/lib/x86
D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
[ 01-08 09:19:49.686 3520: 3520 D/ ]
HostConnection::get() New Host Connection established 0xaab6ddc0, tid 3520
[ 01-08 09:19:49.746 3520: 3534 D/ ]
HostConnection::get() New Host Connection established 0xaff0d4e0, tid 3534
I/OpenGLRenderer: Initialized EGL, version 1.4
W/EGL_emulation: eglSurfaceAttrib not implemented
W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xaa392b60, error=EGL_SUCCESS
I/Choreographer: Skipped 213 frames! The application may be doing too much work on its main thread.
I/Choreographer: Skipped 91 frames! The application may be doing too much work on its main thread.
I/Choreographer: Skipped 75 frames! The application may be doing too much work on its main thread.
I/Choreographer: Skipped 73 frames! The application may be doing too much work on its main thread.
I/Choreographer: Skipped 67 frames! The application may be doing too much work on its main thread.
I/Choreographer: Skipped 77 frames! The application may be doing too much work on its main thread.
I/Choreographer: Skipped 89 frames! The application may be doing too much work on its main thread.
Code
package com.example.nouma.mediease;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity {
//private Button mainbutton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
/* mainbutton = (Button)findViewById(R.id.begin_button);
mainbutton.setOnClickListener(
new Button.OnClickListener(){
public void onClick(View v){
startMain();
}
}
);*/
}
/*
*public void onClick(View v) {
new Thread(new Runnable() {
public void run() {
Bitmap b = loadImageFromNetwork();
mImageView.setImageBitmap(b);
}
}).start();
}
* */
void startMain(){
Intent i = new Intent(this, introActivity.class);
startActivity(i);
finish();
}
}
XML FILE: http://pastebin.com/cQ6fSmvg