Reputation: 1
After updating my android studio to 3.1.1 I found the error in the picture. Before I updated android studio everything was fine.
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class SetTimeActivity extends AppCompatActivity {
private int TIME_IN_MINUTES ;
private EditText et ;
private Button mButtonStartPause;
private Button mButtonReset;
private CountDownTimer mCountDownTimer;
private boolean mTimerRunning;
private long mTimeLeftInMillis;
private long mEndTime;
DevicePolicyManager devicePolicyManager;
ComponentName componentName;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_set_time);
et = (EditText) findViewById(R.id.setTimerMenu_et);
mButtonStartPause = (Button) findViewById(R.id.set_btn);
devicePolicyManager = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
componentName = new ComponentName(SetTimeActivity.this, Controller.class);
Upvotes: 0
Views: 381
Reputation: 1
Thank you for your answer but I got it Now, So they add dependencies to the gradle and we have to replace "compile" with "implementation", something like this , you can find everything you need in this URL :
https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html?utm_source=android-studio#new_configurations
Upvotes: 0
Reputation: 474
Try the following and check if it works :
File -> Invalidate Caches and Restart
Open up your command line and perform a manual gradle build :
./gradlew clean assemble
Make sure you have the following in your build.gradle :
compile "com.android.support:appcompat-v7:{latest}"
Upvotes: 1