java.lang.IllegalStateException:您需要将Theme.AppCompat主题(或后代)与此活动一起使用。在模块中

时间:2016-05-17 13:10:18

标签: android android-studio gradle android-gradle

我有app模块和EBS模块。应用模块是用AppCompat实现的 当EBS模块集成时,我收到错误。 我曾经尝试过堆栈溢出中的所有方法 我找不到app compat主题 我甚至编译了appcompat主题仍然没有在选择主题选项

中显示主题

EBS /摇篮

   apply plugin: 'android-library'

dependencies {
   compile fileTree(include: '*.jar', dir: 'libs')
   compile 'com.android.support:appcompat-v7:23.0.1'

 }

android {
   compileSdkVersion 23
    buildToolsVersion "23.0.1"

sourceSets {
    main {
        manifest.srcFile 'AndroidManifest.xml'
        java.srcDirs = ['src']
        resources.srcDirs = ['src']
        aidl.srcDirs = ['src']
        renderscript.srcDirs = ['src']
        res.srcDirs = ['res']
        assets.srcDirs = ['assets']
    }

    // Move the tests to tests/java, tests/res, etc...
    instrumentTest.setRoot('tests')

    // Move the build types to build-types/<type>
    // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
    // This moves them out of them default location under src/<type>/... which would
    // conflict with src/ being used by the main source set.
    // Adding new build types or product flavors should be accompanied
    // by a similar customization.
    debug.setRoot('build-types/debug')
    release.setRoot('build-types/release')
   }
  }

应用程序/摇篮

apply plugin: 'com.android.application'

 android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
    applicationId 'com.app.sanyog'
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 3
    versionName "1.2"
    multiDexEnabled true
}
configurations{
    all*.exclude group: 'com.mcxiaoke.volley'
}
lintOptions {
    abortOnError false
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
productFlavors {
}
}
android {
     packagingOptions {
       pickFirst 'META-INF/LICENSE.txt' // picks the JavaMail license file
   }
 }
 repositories {
     mavenCentral()
 }
  dependencies {
     compile fileTree(include: ['*.jar'], dir: 'libs')
     compile 'de.hdodenhof:circleimageview:1.3.0'
    compile 'com.android.support:gridlayout-v7:23.1.1'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.mcxiaoke.volley:library-aar:1.0.0'

compile 'com.android.support:design:23.0.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:gridlayout-v7:23.1.1'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp:2.7.5'
compile 'com.android.support:multidex:1.0.1'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
compile 'com.loopj.android:android-async-http:1.4.6'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.wdullaer:materialdatetimepicker:2.0.0'
compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.1.3'
compile 'com.jakewharton:butterknife:6.1.0'
compile 'com.bignerdranch.android:expandablerecyclerview:2.1.1'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.wdullaer:materialdatetimepicker:2.3.0'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
/*compile 'javax.mail:mail:1.4.1'
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
compile files('libs/mail.jar') */
compile project(':EBS')
  }

注意: 我尝试导入appcompat库,但主题没有显示在对话框中

0 个答案:

没有答案