我怎样才能在android studio中解决这类问题?

时间:2016-07-12 19:27:56

标签: android-studio android-studio-2.1

创建新项目后,我收到以下错误

Error:Failed to resolve: com.android.support:design:23.+
Install Repository and sync project 
Show in Project Structure dialog

Error:Failed to resolve: com.android.support:appcompat-v7:23.4.0
Install Repository and sync project
Show in Project Structure dialog

这是截图

Screenshot of the error message

我找到了一些有关此问题的信息。之后,我搜索了Android支持存储库和Google存储库的更新。我找到了Google存储库的更新并对其进行了更新。现在我的所有SDK和工作室都已更新。

我现在如何处理此错误?

1 个答案:

答案 0 :(得分:0)

public class test1扩展AppCompatActivity { private int conte = 100;

private  String b;

字符串i =" CONFIRM&#34 ;;     EditText vared;

int level=1;
 private  TextView end,leevel;


@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_test1);
    getSupportActionBar().hide();


    new Handler().postDelayed(new Runnable() {
        @Override
        public void run() {

            Toast.makeText(test1.this,"زما شما به اتمام رسید !!!", Toast.LENGTH_LONG).show();


            Intent i = new Intent(test1.this, test2.class);
            startActivity(i);

            finish();
        }
    },100000);


    end=(TextView)findViewById(R.id.textView4);
    new Thread(){
        @Override
        public void run() {
            while (conte>=0){
                runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        end.setText(conte+"");
                        conte--;
                    }
                });
                try {
                    sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }
    }.start();
    leevel=(TextView)findViewById(R.id.textView8);
    vared=(EditText)findViewById(R.id.vared) ;

    Button b2 = (Button) findViewById(R.id.button2);
    b2.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            String b = vared.getText().toString();
            Toast.makeText(test1.this,"ذخیره شد حالا میتونی امتحان کنی !", Toast.LENGTH_LONG).show();


        }
    });


    if( i==b) {
        Button b1 = (Button) findViewById(R.id.button);
        b1.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                level++;
                leevel.setText(level + "");


            }
        });
    }else {
        Toast.makeText(test1.this,"اسم وارد شده صخیخ نمیباشد !", Toast.LENGTH_LONG).show();

    }

}

}