When I run
gradle lint
From project dir or root dir I get whole bunch of reports (for every Activity and Application) like
<issue
id="MissingRegistered"
severity="Error"
message="Class referenced in the manifest, com.mypackage.activities.MyActivity, was not found in the project or the libraries"
category="Correctness"
priority="8"
summary="Ensures that classes referenced in the manifest are present in the project or libraries"
explanation="If a class is referenced in the manifest, it must also exist in the project (or in one of the libraries included by the project. This check helps uncover typos in registration names, or attempts to rename or move classes without updating the manifest file properly."
url="http://developer.android.com/guide/topics/manifest/manifest-intro.html"
urls="http://developer.android.com/guide/topics/manifest/manifest-intro.html"
errorLine1=" <activity"
errorLine2=" ^">
<location
file="AndroidManifest.xml"
line="58"
column="9"/>
</issue>
I'm sure they are referenced correctly because after a build like
gradle build
or
gradle assembleDebug
Every Activity can be launched.
My projects have some subprojects if that matters.
settings.gradle
include ':Lib1'
include ':Lib2'
include ':MainProject'
Every activity is listed in manifest of MainProject and is located in MainProject.
MainProject/AndroidManifest.xml
Packagename and activity names were replaced, but the general package hierarchy represents the real hierarchy. Also I removed some activities and left two for example. All others are in the same package and defined just like the last one, just have different names.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.my.package"
android:installLocation="auto"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="19" />
<application
android:name="com.my.package.subpackage.MyApp"
android:allowBackup="true"
android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:largeHeap="true"
android:hardwareAccelerated="true"
android:theme="@style/AppTheme" >
<activity
android:name="com.my.package.subpackage.activities.SplashActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="sensorLandscape"
android:configChanges="orientation|screenSize" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.my.package.subpackage.activities.HelpActivity"
android:theme="@style/TransparentTheme"/>
</application>
</manifest>