Android emulator freezes at startup create new virtual device
If Android emulator freezes at startup, try create new virtual device with smaller memory and cpu usage, or select older version of Android, or buy new pc with higher performance.

- open AVD MANAGER
- press Create Virtual Device
- select Device with small memory usage (e.g. 480x800 of resolution) - Next
- check - Show downloadable ....
- Download - lower version of system Android, select, press - Next
- check data, Show Advanced Settings, check Use host... and press Finish

396LW NO topic_id
AD
Další témata ....(Topics)
android:gravity="left|center_vertical" or android:gravity="right|center_vertical"
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:paddingLeft="20dp"
android:text="My Button"
/>
break statement in Java Android basic example
MainClass.java
MainClass.java
public class MainClass {
public static void main(String[] arg) {
String[] arrayOfString = {"nothing", "Hello", "people"
, "bye-bye", "hello", "world!", "end" };
for (int i = 0; i < arrayOfString.length; i++) {
System.out.println(arrayOfString[i]);
if(i > 2)
break; // end of loop
}
}
}
/*
nothing
Hello
people
bye-bye
*/
public class MainClass extends Activity {
ActivityManager activityManager;
MemoryInfo memoryInfo;
final String TAG = "MemInfo";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
memoryInfo = new ActivityManager.MemoryInfo();
activityManager.getMemoryInfo(memoryInfo);
Log.i(TAG, " memoryInfo.availMem " + memoryInfo.availMem);
Log.i(TAG, " memoryInfo.lowMemory " + memoryInfo.lowMemory);
Log.i(TAG, " memoryInfo.threshold " + memoryInfo.threshold);
Toast.makeText(getApplicationContext(), String.valueOf( memoryInfo.availMem), Toast.LENGTH_LONG)
.show();
} // end onCreate
}
How change background color of View Android sample.
MainActivity.java
main.xml
MainActivity.java
public class MainActivity extends Activity {
TextView hTextView;
TableRow hTableRow;
Button hButton, hButtonStop;
private Handler mHandler = new Handler();
private int nCounter = 0;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
hTextView = (TextView)findViewById(R.id.idTextView);
hButton = (Button)findViewById(R.id.idButton);
hButton.setOnClickListener(mButtonStartListener);
hTableRow = (TableRow)findViewById(R.id.idTableRow1);
} // end onCreate
View.OnClickListener mButtonStartListener = new OnClickListener() {
public void onClick(View v) {
hTableRow.setBackgroundColor(Color.YELLOW);
}
};
}
main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="//schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TableLayout android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/tableLayout1">
<TableRow android:id="@+id/idTableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:background="#5655AA">
<TextView
android:id="@+id/idTextView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
</TableRow>
</TableLayout>
</LinearLayout>
Failed to rename directory ....
If using for update Android SDK manager,
try close Eclipse if is open.
Or change security settings of the folder which have problem.
Or disable antivirus for a moment.
If using for update Android SDK manager,
try close Eclipse if is open.
Or change security settings of the folder which have problem.
Or disable antivirus for a moment.
Editace: 2015-11-08 10:49:52
Počet článků v kategorii: 396
Url:android-emulator-freezes-at-startup-create-new-virtual-device