Android Studio bug versioncode versionname signed apk issue
If you change android:versionCode="224" and android:versionName="2.2.4" in AndroidManifest.xml you have to change this in build.gradle file too.
Click on build.gradle in package explorer tree change your new version name and code:
Click on build.gradle in package explorer tree change your new version name and code:
defaultConfig {
applicationId "cz.okhelp.pocasiwidget"
minSdkVersion 11
targetSdkVersion 23
versionCode 224
versionName "2.2.4"
}
396LW NO topic_id
AD
Další témata ....(Topics)
C:\documents\workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.ui.prefs
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new SampleView(this));
}
private static Bitmap codec(Bitmap src, Bitmap.CompressFormat format,
int quality) {
ByteArrayOutputStream os = new ByteArrayOutputStream();
src.compress(format, quality, os);
byte[] array = os.toByteArray();
return BitmapFactory.decodeByteArray(array, 0, array.length);
}
private static class SampleView extends View {
// CONSTRUCTOR
public SampleView(Context context) {
super(context);
setFocusable(true);
}
@Override
protected void onDraw(Canvas canvas) {
Paint paint = new Paint();
canvas.drawColor(Color.YELLOW);
Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.flower_blue);
Bitmap bPNGcompress = codec(bmp, Bitmap.CompressFormat.PNG, 0);
int h = bmp.getHeight();
canvas.drawBitmap(bmp, 10,10, paint);
canvas.drawBitmap(bPNGcompress, 10,10 + h + 10, paint);
}
}
}
Try this code with CursorLoader:
Uri uri = getIntent().getData();
// DEPRECATED
Cursor cursor = managedQuery(uri, null, null, null, null);
// WORKING - loadInBackground() preventing freezing of app
Cursor cursor = new CursorLoader(getApplicationContext(),uri, null, null, null, null).loadInBackground();
Intent i = new Intent(this, MyNextClass.class);
startActivity(i);
drawText(), setColor(), setTextSize(), setTextAlign()
public class ApokusActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new SampleView(this));
}
private static class SampleView extends View {
// CONSTRUCTOR
public SampleView(Context context) {
super(context);
setFocusable(true);
}
@Override
protected void onDraw(Canvas canvas) {
Paint paint = new Paint();
paint.setColor(Color.YELLOW);
paint.setTextSize(60);
//paint.setTextAlign(Paint.Align.CENTER);
canvas.drawText("Hello world!", 0, 50, paint);
}
}
}
Editace: 2015-12-12 11:30:07
Počet článků v kategorii: 396
Url:android-studio-bug-versioncode-versionname-signed-apk-issue