问题描述
我正在为我的Pluralsight培训课程开发一个演示项目,并且尝试做一些事情,就像通过Android Studio UI添加新活动一样简单。我右键单击“ Java”文件夹(正常的android文件夹结构)下的主文件夹,然后选择“活动” ...“导航抽屉活动”。我完成了所有向导步骤,然后在AndroidManifest.xml文件中创建了新条目。但是,也不会创建UI资源xml文件,也不会创建kotlin .kt文件。我有一台Windows 10机器和Kubuntu 20.04机器,并且在两者上都得到了相同的行为。
以下是我使用最多的Kubuntu机器上的Android Studio构建详细信息:
Android Studio 4.0.1
Build #AI-193.6911.18.40.6626763,built on June 24,2020
Runtime version: 1.8.0_242-release-1644-b3-6222593 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 5.4.0-42-generic
GC: ParNew,ConcurrentMarkSweep
Memory: 2014M
Cores: 4
Registry: ide.new.welcome.screen.force=true
Non-Bundled Plugins:
这是AndroidManifest.xml文件。我尝试添加的活动称为.ItemActivity。 IDE用红色强调它,表示我在项目中没有随附的类文件和资源文件,但是我已经知道了。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.notekeeper" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<activity
android:name=".ItemsActivity"
android:label="@string/title_activity_items"
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=".NoteListActivity"
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=".NoteActivity"
android:label="@string/note_edit"
android:theme="@style/AppTheme.NoActionBar" />
</application>
</manifest>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)