Ich installierte Android Studio 2.1 und versuchte, Mockito zu lernen.Fehler Keine Ressource gefunden, die den angegebenen Namen Theme.AppCompat.Light.DarkActionBar entspricht. Android Studio 2.1.1 + Support-Bibliothek
Die Mock-Objekte wurden jedoch nicht erstellt, da die @Mock-Annotation nicht erkannt wurde (Kompilierungsfehler).
Also habe ich Android Support Library 33.0 installiert. Jetzt bekomme ich Fehler: Keine Ressource gefunden, die dem angegebenen Namen entspricht Theme.AppCompat.Light.DarkActionBar
Ich aktualisierte Android Studio zu 2.1.2 aber keinen Unterschied.
Jede Hilfe wird geschätzt.
Information:Gradle tasks [:app:generateDebugSources, :app:prepareDebugUnitTestDependencies, :app:mockableAndroidJar,
:app:compileDebugUnitTestSources]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources
D:\Documents\Learn\Testing\MyApplication\app\build\intermediates\res\merged\debug\values\values.xml
Error:(7) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
D:\Documents\Learn\Testing\MyApplication\app\src\main\res\values\styles.xml
Error:(4, 5) No resource found that matches the given name: attr 'colorAccent'.
Error:(4, 5) No resource found that matches the given name: attr 'colorPrimary'.
Error:(4, 5) No resource found that matches the given name: attr 'colorPrimaryDark'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command
'D:\Android\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1
Information:BUILD FAILED
Information:Total time: 6.239 secs
Information:5 errors
Information:0 warnings
Information:See complete output in console
Meine gradle Datei ist hier:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "me.com.myapplication"
minSdkVersion 22
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:runner:0.4'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
}
Veröffentlichen Sie Ihre Gradle-Datei. –
Bitte posten Sie Ihre GRADLE-Datei. Versuchen Sie auch, Ihr Projekt in Android Studio neu zu erstellen. –
oops, hier angehängt ... – likejiujitsu