我是android studio中的新手,當我嘗試運行我的應用程序時出現此錯誤。我尋找解決方案,但無法修復它。我正在嘗試在我的應用程序中登錄gmail。 i的生成改變的gradle無法識別啓動活動:找不到默認活動啓動活動時出錯
compile 'com.google.android.gms:play-services:6.1.11'
到
compile 'com.google.android.gms:play-services:8.3.0'
清單是如下
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<application
android:name=".MytestApp"
android:allowBackup="true"
android:icon="@drawable/logo"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/app_id" />
<provider
android:name="com.facebook.FacebookContentProvider"
android:authorities="com.facebook.app.FacebookContentProvider572987599539975"
android:exported="true" />
<activity
android:name=".MainActivity"
android:label="Home"
android:theme="@style/AppTheme.NoActionBar">
</activity>
<activity
android:name=".LoginActivity"
android:label="Login">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SplashActivity"
android:label="@string/app_name">
</activity>
<activity android:name=".GoogleActivity"/>
<activity
android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</manifest>
構建搖籃
android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.example.bishnu.mylifemarkapp"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:design:24.2.0'
compile 'com.google.android.gms:play-services:8.3.0'
}
將您的完整清單張貼爲代碼而不是圖片 –
您的錯誤是什麼錯誤? – musica
嘗試重新啓動....文件 - >無效緩存/重新啓動... –