IDE : Android Studio
- Create a new project
- Copy .jar appcompat using / lib /
- Set dependencies in project settings
- Add compilation "com.android.support:appcompat-v7:18.0.+" to build .gradle
Add the following code:
public class MainActivity extends ActionBarActivity {
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ActionBar actionBar = getSupportActionBar(); actionBar.setTitle("hello"); }
And nothing. Get the following error:
"Gradle: A problem occurred configuring project ':MyApplication'. > Failed to notify project evaluation listener. > Could not resolve all dependencies for configuration ':MyApplication:_DebugCompile'. > Could not find any version that matches com.android.support:appcompat-v7:18.0.+. Required by: MyApplicationProject:MyApplication:unspecified"
How to fix? What did I forget to do?
source share