在Android Studio中,我收到错误"无法解析符号'活动'。
我已查看其他问题并尝试以下
这些都没有。
任何帮助都将不胜感激。
这是我的AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.thesgn.app"
android:installLocation="auto">
<!-- versionCode, versionName, minSdkVersion, targetSdkVersion properties are set via Gradle script -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:protectionLevel="signature" android:name="com.thesgn.app.permission.C2D_MESSAGE" />
<uses-permission android:name="com.thesgn.app.permission.C2D_MESSAGE" />
<application
android:name=".WebViewAppApplication"
android:icon="@drawable/ic_launcher"
android:label="TheSGN"
android:theme="@style/Theme.WebViewApp.Orange"
android:hardwareAccelerated="true"
android:allowBackup="true">
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<meta-data android:name="com.google.android.gms.analytics.globalConfigResource" android:resource="@xml/analytics_global_tracker" />
<activity
android:name=".activity.MainActivity"
android:label="@string/app_name"
android:launchMode="standard"
android:configChanges="keyboard|keyboardHidden|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.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode|smallestScreenSize" />
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.ParseBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.ParsePushBroadcastReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.thesgn.app" />
</intent-filter>
</receiver>
<meta-data android:name="com.parse.push.notification_icon" android:resource="@drawable/ic_stat_notify" />
</application>
答案 0 :(得分:1)
.activity
将是您MainActivity
所在软件包的名称。您只需根据应用层次结构调整android:name
代码即可。如果它位于顶部,则只有.MainActivity
,否则为.somePackageName.MainActivity
。
答案 1 :(得分:0)
机器人:名称=&#34; .activity.MainActivity&#34;
应该是
机器人:名称=&#34; .MainActivity&#34;
答案 2 :(得分:0)
当您在加载时关闭模拟器时会发生这种情况。只需您可以执行清理构建项目并再次运行模拟器,直到它加载您的应用程序。