ich diesen Fehler auftreten, wennAndroid Studio "Fehler zu beheben: com.android.support:support-core-utils:23.2.1"
compile "com.android.support:support-core-utils:23.2.1"
build.gradle für mein Handy-App hinzuzufügen versuchen. Hier ist die gesamte build.gradle (mobile) Plugin anwenden: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.xxxxxxx.sam.collegegrader"
minSdkVersion 10
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
wearApp project(':wear')
compile 'com.google.android.gms:play-services:9.8.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:support-core-utils:23.2.1'
}
Dies ist mein erstes Android-App so kann ich nur noch einen Anfänger Fehler gemacht. Hier sind die Problemschritte zu lösen, die ich gemacht habe:
Failed to resolve: com.android.support:appcompat-v7:15.+ - hatte nicht die Support-Bibliothek
heruntergeladenhttps://developer.android.com/studio/intro/update.html#sdk-manager - Gefolgt Tutorial der Bibliothek hinzufügen
https://developer.android.com/topic/libraries/support-library/setup.html#using-apis - Added Kompilierung build.gradle (mobile)
failed to resolve com.android.support:appcompat-v7:22 and com.android.support:recyclerview-v7:21.1.2 - ich glaube, dass ich die richtige Version # in build.gradle (23.2.1)
Hier haben ist, wo ich bin TRYI ng Android zu verwenden: theme = "@ style/ThemeOverlay.AppCompat.Dark.Actionbar" res/layout/activity_view_college.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.xxxxxx.sam.collegegrader.ViewCollegeActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="@style/ThemeOverlay.AppCompat.Dark.Actionbar"
android:fitsSystemWindows="true" >
</android.support.design.widget.AppBarLayout>
<!--<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:text="@string/large_text" />-->
</android.support.design.widget.CoordinatorLayout>
styles.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
styles.xml (v21)
<resources>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
</resources>
Danke! Noch eine Sache: Ich habe versucht, diese Bibliothek hinzuzufügen, um schließlich zu lösen. Fehler: (13, 24) Keine Ressource gefunden, die dem angegebenen Namen entspricht (bei 'Thema' mit Wert '@ style/ThemeOverlay.AppCompat.Dark.Actionbar') . "Ich habe immer noch diesen Fehler und ich dachte, dass er in support-core-utils enthalten ist. Muss ich etwas in der XML-Datei deklarieren, die über die Aktionsleiste verfügt? – kir13y
Dieses Thema ist in der appcompat-Bibliothek enthalten, die in Ihrem Skript build.gradle vorhanden zu sein scheint. Verwenden Sie diesen Stil direkt in Ihrem Layout oder haben Sie in styles.xml deklariert? Können Sie die Frage mit dem Layout/der Datei, in der Sie diesen Stil verwenden, aktualisieren? –
Ich habe die Frage mit weiteren Informationen aktualisiert. Ich benutze es in styles.xml und ein paar anderen Orten, die alle Fehler werfen. – kir13y