Call requires API level xx current min is xx android
Call requires API level 16 (current min is 4): android
Change The SDK version in AndroidManifest.xml to higher
Change The SDK version in AndroidManifest.xml to higher
<uses-sdk android:minSdkVersion="4" />
//
<uses-sdk android:minSdkVersion="8" />
396LW NO topic_id
AD
Další témata ....(Topics)
Create file restartADB.bat in folder
c:\Program Files\Android\android-sdk-windows\platform-tools\
Write into restartADB.bat this code:
Save restartADB.bat file.
If you want restart adb.exe server, run restartADB.bat by double click on icon.
Next example:
[caption id="attachment_778" align="alignleft" width="300" caption="ADB server restart by command line"][/caption]
Try restart ADB if this or similar errors:
Emulator] emulator: emulator window was out of view and was recentred
c:\Program Files\Android\android-sdk-windows\platform-tools\
Write into restartADB.bat this code:
adb kill-server && adb start-server
pause
Save restartADB.bat file.
If you want restart adb.exe server, run restartADB.bat by double click on icon.
Next example:
- Open Total Commander
- Open folder with adb.exe usually in
c:\Program Files\Android\android-sdk-windows\platform-tools\ - Put into command line command: adb kill-server && adb start-server and press Enter
[caption id="attachment_778" align="alignleft" width="300" caption="ADB server restart by command line"][/caption]
Try restart ADB if this or similar errors:
Emulator] emulator: emulator window was out of view and was recentred
public class MainActivity extends Activity implements OnClickListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
LinearLayout layout = (LinearLayout) findViewById(R.id.layout);
RadioGroup radioGroup = new RadioGroup(this);
LinearLayout.LayoutParams p = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.FILL_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT
);
layout.addView(radioGroup, p);
RadioButton radioButtonView = new RadioButton(this);
radioButtonView.setText("RadioButton");
radioButtonView.setOnClickListener(this);
radioGroup.addView(radioButtonView, p);
RadioButton radioButtonView2 = new RadioButton(this);
radioButtonView2.setText("RadioButton2");
radioButtonView2.setOnClickListener(mThisButtonListener);
radioGroup.addView(radioButtonView2, p);
}
public void onClick(View view) {
try {
String s = ((RadioButton) view).getText().toString();
Toast.makeText(MainActivity.this, "This is: " + s,
Toast.LENGTH_LONG).show();
}
catch (Exception e1) {
e1.printStackTrace();
}
}
private OnClickListener mThisButtonListener = new OnClickListener() {
public void onClick(View v) {
String s = ((RadioButton) v).getText().toString();
Toast.makeText(MainActivity.this, "Hello from 2!" + s,
Toast.LENGTH_LONG).show();
}
};
}
If I create own folder layout-w320dp with Eclipse Android 4.4
layout was correctly loaded.
If I trying this application on tablet with Android 2.1 application crashed.
layout was correctly loaded.
If I trying this application on tablet with Android 2.1 application crashed.
main.xml
<LinearLayout xmlns:android="//schemas.android.com/apk/res/android"
android:orientation="vertical"
android:gravity="top"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<HorizontalScrollView
android:id="@+id/horizontalScrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:gravity="top"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/imageViewObrazekGeometrie"
android:layout_width="360dp"
android:layout_height="777dp"
android:src="@drawable/geometrie_vzorecky" />
</LinearLayout>
</HorizontalScrollView>
</ScrollView>
</LinearLayout>
Html.fromHtml(), setText(), textView.setText(Html.fromHtml(String htmlFormat)), Android example.
TextView mIdTextOk = (TextView)findViewById(R.id.idTextOk);
int _nOk = 57;
// number 57 will bold style
mIdTextOk.setText(Html.fromHtml( "OK: "+"<b>"+_nOk+"</b>"));
Editace: 2013-09-17 20:32:51
Počet článků v kategorii: 396
Url:call-requires-api-level-xx-current-min-is-xx-android