I did the project import from an eclipse app to Android Studio. The import occurred smoothly and the gradle was created. However, I notice that the visual components like EditText, ProgressBar, AppBar, Button are with an outdated look, of version 3.0 of android. I upgraded my minSdk to 15 and targetSdk to 23 and refreshed the gradle, but the visual components remain in the old APIs.
I also notice that whenever I create a new activity, I have the following pattern:
import android.app.Activity;
import android.os.Bundle;
public class TesteActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_teste);
}
}
Activities only inherit from activity , not AppCompatActivity , as seen below in any project created in Android Studio:
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
By changing the inheritance of TesteActivity
from Activity
to AppCompatActivity
, Android does not recognize the class. Recalling that this problem occurs only within the project imported from eclipse.
Is there any way I can import this old project to work with the latest Android Studio components / features?