简体   繁体   中英

cannot resolve symbol mainactivity after importing from github

I made a project, imported it to github, moved it to a group url ( https://github.com/friendsies/Alerta ) and then went to import it so that I'd be updating it instead of the nonexistent one on my personal URL. I imported it, but it won't build, because a bunch of symbols in AndroidManifest.xml can't be resolved. I think I need to add my src directory as a source, but i'm not sure how to do that, and more importantly I'd like to know what I could change so that future people importing my project won't face the same problem. Thanks in advance. The symbols that aren't resolving btw are

android:name=".MyParseApplicationClass"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Base.Theme.AppCompat.Light.DarkActionBar"
<activity android:name=".MainActivity">
<activity android:name=".LoginActivity">
<activity android:name=".SignupActivity">

Check with your Build.gradle that whether all dependency and compile are their and also check the compile version for eg"compile 'com.android.support:appcompat-v7:23.1.1'". Check compile SDK version and Target SDK version after resolving build the project.

    <application
    android:name=".MyParseApplicationClass"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/Base.Theme.AppCompat.Light.DarkActionBar">

    <activity android:name=".MainActivity">
    </activity>
    <activity android:name=".LoginActivity">
 <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
    </activity>
    <activity android:name=".SignupActivity">
    </activity>
    </application>

Correct the above too in your manifest. Hope it works

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM