1

私の単純な「Hello World」アプリは、Samsung gt_3113 (Android 4.2.2) のタブレットで動作しますが、mi_4c (Android 5.1.1) のスマートフォンでは動作しません。Android Studio 2.2.2 を使用しています。なんで?

関連ファイル:
AndroidManifest.xml:

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

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

</manifest>

build.gradle

 apply plugin: 'com.android.application'

    android {
        compileSdkVersion 25
        buildToolsVersion "25.0.0"
        defaultConfig {
            applicationId "com.adc2017gmail.testmi4c"
            minSdkVersion 10
            targetSdkVersion 25
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
        compile 'com.android.support:appcompat-v7:25.0.1'
        testCompile 'junit:junit:4.12'
    }

エラーメッセージ

11/27 16:01:54: Launching app
$ adb push C:\DREAM\TestMi4\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.adc2017gmail.testmi4c
$ adb shell pm install -r "/data/local/tmp/com.adc2017gmail.testmi4c"
Aborted 


$ adb shell am start -n "com.adc2017gmail.testmi4c/com.adc2017gmail.testmi4c.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error while executing: am start -n "com.adc2017gmail.testmi4c/com.adc2017gmail.testmi4c.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.adc2017gmail.testmi4c/.MainActivity }
Error type 3
Error: Activity class {com.adc2017gmail.testmi4c/com.adc2017gmail.testmi4c.MainActivity} does not exist.

Error while Launching activity

ドライバを再インストールしようとしましたが、

  • プロジェクトをクリーンアップしました
  • ビルドディレクトリを削除
  • Androidスタジオを再起動しました
  • プロジェクトを再構築する
  • 走る

Android Studio 2.2.2 から 1.5.1 にジャンプ

4

1 に答える 1

0

私のLG Stylus 3 Android 7.0のようなデバイスを持っていると思います.デスクトップからアプリを押してゴミ箱に移動すると、アプリはデバイスから削除されません. 詳細については、同じ質問に対する私の回答を参照してください。

于 2017-11-12T17:46:15.277 に答える