Gradle lint can't find classes referenced in AndroidManifest.xml

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="        &lt;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>

Answers


As stated in tech doc Gradle don't support lint yet. Before Gradle will be stable you can be faced with many problems


Need Your Help

How to get Highlight the human body parts by tapping on body image iOS?

ios objective-c

I have human body with head, arms, legs, and all. when i tap on head i need to show some table related to head diseases,when i touch leg same as previous one and also how i can highlight the tapped...

CodeMirror readOnly allow paste from keyboard shortcut and mouse right click option

codemirror

Im doing an app that will serve a purpose to teach class of students using codemirror plugin. The problem that i have is this, i dont want students to be able to change the code that im displaying ...