android studio svn commit changelist delete

When submitting code, the Partial Commit of Active Changelist will be prompted. Usually, Yes will be selected. However, as shown in the figure, I want to delete the Partial Commit of Active ChangelistSolution:

The APK file does not exist on disk.Error while Installing APK

Run apK, report this error directly, clean will not work solution:

Android Studio gets SHA1

Development map, in their background need to fill SHA1, used to fill MD5 value, MD5 value is very simple to obtain, that SHA1 how to obtain? Global configuration jdk1.8.0_45\bin (or CD go to bin directory) 2, keytool -v -list -keystore your keystore path 3, enter the keystore password: if not set, this is empty, directly enter enter.

Android 6.0 Dialog text doesn’t appear

AlertDialog.Builder builder = new AlertDialog.Builder(this); Builder.settitle (" Log out "); Builder.setmessage (" Are you sure you want to log out? ); Builder. SetNegativeButton (" cancel ", null); Builder. SetPositiveButton (" sure," new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { HashMap params = new HashMap(); postData(API.LOGOUT, params, false, new ResponseCallBack(Settingctivity.this) { @Override public void onSuccessResponse(String bean, String msg) { } @Override public void onFailResponse(String msg) { } }, null, null, true); }}); builder.create().show();Copy the code

Normal this is fine, but in Android 6.0 found that the text does not display, as shown in the figure:

Solution:

/**
 * http://stackoverflow.com/questions/33228454/android-6-0-dialog-text-doesnt-appear
 *
 * @param context
 * @return
 */
public static AlertDialog.Builder alertDialogBuilder(Context context) {
    AlertDialog.Builder builder;
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        builder = new AlertDialog.Builder(context, android.R.style.Theme_Material_Light_Dialog_Alert);
    } else {
        builder = new AlertDialog.Builder(context);
    }
    return builder;
}Copy the code

And then initialize it

AlertDialog.Builder builder = alertDialogBuilder(this);Copy the code

URLEncoder.encode

If the network request, the parameters contain Chinese, then need to URLEncoder forward

URLEncoder. Encode (parameter values"utf-8")Copy the code

Click the back key twice to exit

@Override 
    public boolean onKeyUp(int keyCode, KeyEvent event) { 
        if (keyCode == KeyEvent.KEYCODE_BACK) { 
            long secondTime = System.currentTimeMillis(); 
            if (secondTime - firstTime > 800) {// If the interval between two keystrokes is greater than 800 ms, the system does not exit
                Toast.makeText(MainActivity.this."Press exit again...", 
                        Toast.LENGTH_SHORT).show(); 
                firstTime = secondTime;/ / update the firstTime
                return true; 
            } else { 
                // If not, exit the program}}return super.onKeyUp(keyCode, event); 
    }Copy the code

See my blog more actual combat experience: wuxiaolong me / 2015/08/10 /…

Wechat official account