Android Studioでコードを書いてAndroidアプリを作っております。
実機でデバッグしていたのですが、Run'app'(緑色の三角)を押したあとアプリがインストールされなくなりました。
エミュレータでは問題なくインストール・起動がされています。
解決策をお教えいただきたいです。
発生している問題・エラーメッセージ
-------------Event Log------------- 18:20 Executing tasks: [:app:assembleDebug] 18:20 Gradle build finished in 3 s 172 ms 18:20 Install successful 18:20 Session 'app': Error Launching activity -------------Run app------------- 06/08 18:20:17: Launching app $ adb shell am start -n "com.×××××××××××.×××××××××××/com.×××××××××××.×××××××××××.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Error while executing: am start -n "com.×××××××××××.×××××××××××/com.×××××××××××.×××××××××××.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.×××××××××××.×××××××××××/.MainActivity } Error type 3 Error: Activity class {com.×××××××××××.×××××××××××/com.×××××××××××.×××××××××××.MainActivity} does not exist. Error while Launching activity -------------Logcat------------- 2019-06-08 18:23:49.276 7806-7843/com.×××××××××××.××××××××××× E/FirebaseInstanceId: Token retrieval failed: AUTHENTICATION_FAILED
該当のソースコード
AndroidManifest
1<?xml version="1.0" encoding="utf-8"?> 2<manifest xmlns:android="http://schemas.android.com/apk/res/android" 3 package="com.×××××××××××.×××××××××××"> 4 5 <application 6 android:allowBackup="true" 7 android:icon="@mipmap/ic_launcher" 8 android:label="@string/app_name" 9 android:supportsRtl="true" 10 android:theme="@style/AppTheme"> 11 <activity 12 android:name=".MainActivity" 13 android:screenOrientation="portrait"> 14 <intent-filter> 15 <action android:name="android.intent.action.MAIN" /> 16 <category android:name="android.intent.category.LAUNCHER" /> 17 </intent-filter> 18 </activity> 19 <activity 20 android:name=".×××××××××××Activity" 21 android:screenOrientation="portrait" /> 22 <activity 23 android:name=".×××××××××××Activity" 24 android:screenOrientation="portrait" /> 25 <activity android:name=".×××××××××××Activity" /> 26 <activity android:name=".×××××××××××Activity" /> 27 28 <meta-data 29 android:name="google_analytics_adid_collection_enabled" 30 android:value="false" /> 31 32 <meta-data 33 android:name="com.google.android.gms.ads.APPLICATION_ID" 34 android:value="@string/app_id"/> 35 </application> 36 37</manifest>
buildgradle
1apply plugin: 'com.android.application' 2 3android { 4 compileSdkVersion 28 5 defaultConfig { 6 applicationId "com.×××××××××××.×××××××××××" 7 minSdkVersion 21 8 targetSdkVersion 28 9 versionCode 11 10 versionName "4.0.0.11" 11 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 } 13 buildTypes { 14 release { 15 minifyEnabled false 16 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 } 18 } 19} 20 21dependencies { 22 implementation fileTree(include: ['*.jar'], dir: 'libs') 23 implementation 'com.android.support:appcompat-v7:28.0.0' 24 implementation 'com.android.support:customtabs:28.0.0' 25 implementation 'com.google.android.gms:play-services-ads:17.2.1' 26 implementation 'com.android.support.constraint:constraint-layout:1.1.3' 27 implementation 'com.google.firebase:firebase-ads:17.2.0' 28 testImplementation 'junit:junit:4.12' 29 androidTestImplementation 'com.android.support.test:runner:1.0.2' 30 androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 31 implementation 'com.android.support:support-v4:28.0.0' 32 implementation 'com.android.support:design:28.0.0' 33} 34apply plugin: 'com.google.gms.google-services'
buildgradle
1// Top-level build file where you can add configuration options common to all sub-projects/modules. 2 3buildscript { 4 repositories { 5 jcenter() 6 google() 7 maven { 8 url 'https://maven.fabric.io/public' 9 } 10 } 11 dependencies { 12 classpath 'com.android.tools.build:gradle:3.4.1' 13 // NOTE: Do not place your application dependencies here; they belong 14 // in the individual module build.gradle files 15 classpath 'com.google.gms:google-services:4.2.0' 16 } 17} 18 19allprojects { 20 repositories { 21 jcenter() 22 google() 23 maven { url "https://jitpack.io" } 24 } 25} 26 27task clean(type: Delete) { 28 delete rootProject.buildDir 29}
補足情報
AndroidStudio 3.4.1
使用エミュレータ Pixel 2 XL API 28
使用実機 Xperia XZ3 API 28
×××××××××××の部分は伏せ字にさせていただいております。
回答1件
あなたの回答
tips
プレビュー