Ich lerne Android (mit Android Studio 2.1.1).Ausgewählte Aktivitätsvorlage erfordert ein vorhandenes Anwendungsthema
Ich habe ein Projekt mit einem Anwendungsmodul "app" und einem Bibliotheksmodul "mylibrary" erstellt.
Ich kann eine Basisaktivität zum App-Modul hinzufügen und sie aus der Hauptaktivität aufrufen, aber auf dem Modul mylibrary kann ich nur eine "leere" Aktivität erstellen. Jedes Mal, wenn ich versuche, eine „Grundaktivität“ hinzuzufügen bekomme ich den Fehler:
„Ausgewählte Aktivitätsvorlage eine bestehende Anwendung Theme erfordert“
Warum kann ich eine Grundaktivität in der Bibliothek Modul hinzufügen?
--- EDIT ----
Dies ist nur eine minimale Hallo-Welt-Anwendung, fast kein Code von mir geschrieben, ich bin nur verwirrt, warum Android wird mir eine Aktivität eine nicht zulassen hinzufügen Bibliotheksmodul, da es auf dem App-Modul funktioniert.
style.xml
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- 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" />
manifest:
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".LibMainActivity" />
<!--
ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information.
-->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name=".BasicActivity"
android:label="@string/title_activity_basic"
android:theme="@style/AppTheme.NoActionBar"></activity>
</application>
Bitte fügen Sie Ihren Code hier und Manifest-Datei, style.xml auch –