Pier Giorgio Misley
Pier Giorgio Misley

Reputation: 5351

android "use $ instead of ." produce cannot resolve symbol

In my manifest. with the new SDK, it requires me to replace my android:name paths with the warning:

use $ instead of . for inner classes(or use only lowercase letters in package name)

This is one of my activities:

<activity
    android:name=".Activities.LoginActivity" >
</activity>

and it suggest me to replace it with

<activity
    android:name=".Activities$LoginActivity" >
</activity>

The problem is that this produce the following:

Cannot resolve symble Activities

So, what I have to do? I just ignore the alert or I have to replace it someway else?

EDIT:

here is the source of activities folder:

app.java.personal.pier.myapp.Activities

this is my entire manifest, I don't think it should be need but just in case it is here :)

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="personal.pier.myapp" >

    <uses-permission android:name="andorid.permission.WRITE_EXTERNAL_STORAGE" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        android:supportsRtl="true" >
        <activity
            android:name=".Activities.SplashScreenActivity"
            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=".Activities.LoginActivity" >
        </activity>
        <activity
            android:name=".Activities.HomePageActivity" >
        </activity>
        <activity
            android:name=".Activities.FoodAddActivity" >
        </activity>
        <activity
            android:name=".Activities.FoodManagementActivity" >
        </activity>
        <activity
            android:name=".Activities.FoodDetailsActivity" >
        </activity>
        <activity
            android:name=".Activities.EatingSuntActivity" >
        </activity>
        <activity
            android:name=".Activities.EatingDetailsActivity" >
        </activity>
        <activity
            android:name=".Activities.EatingAddActivity" >
        </activity>
        <activity android:name=".Activities.SportAddActivity" >
        </activity>

    </application>

</manifest>

Upvotes: 3

Views: 1181

Answers (1)

Matt
Matt

Reputation: 1308

The most likely problem appeared because you are using upper case in your package name.

Upvotes: 10

Related Questions