最为Android初学者,在调试程序时出现了这个错误:
android.content.ActivityNotFoundException: Unable to find explicit activity class
解决方法:
我得AndroidMainfest.xml如下:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.woai_fish.crimeintent" > <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="25" /> <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 =".CrimePagerActivity"/> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>发现时没有申明调用的Activity,于是
在<application></application>之间添加这个之后解决
<activity android:name=".CrimeListActivity" >