嘿伙计们,我在尝试在 android studio 上运行我的应用程序的模拟器时遇到了问题。这是我收到的错误:
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.dre.appli/com.example.dre.appli_app.LoginActivity }
Error type 3
Error: Activity class {com.example.dre.appli/com.example.dre.appli_app.LoginActivity} does not exist.
我尝试了人们建议的一切,但没有成功。这是我的 list
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.wheretas.appli_app">
<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".LoginActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".CreateAccount"
android:label="@string/title_activity_create_account"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="app.createaccount" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
最佳答案
我想您的LoginActivity
有一个包com.example.dre.appli_app.LoginActivity
但是您的 list 包不同:
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.wheretas.appli_app">
...
尝试设置它com.example.dre.appli_app
关于java - Intent Activity 类不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35831644/