2017-06-23 4 views
5

これは現在非常に奇妙です。どんなプロジェクトであっても、私のアンドロイドアプリは他のROMではなく、API25のみで動作します。デフォルトのhello worldアプリは他のAPIで実行されません。 基本的に、nouugatベースのROM以外のROMでは、apkのインストールが失敗します。
マイここAndroidアプリはAPI25でのみ実行されます

はbuild.gradle(モジュール:アプリ)ですがminsdkversionが21である

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "26.0.0" 
    defaultConfig { 
     applicationId "com.rishav.basictest" 
     minSdkVersion 21 
     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 { 
    implementation fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    implementation 'com.android.support:appcompat-v7:25.4.0' 
    testImplementation 'junit:junit:4.12' 
    implementation 'com.android.support.constraint:constraint-layout:1.0.2' 
} 

Build.gradle(プロジェクト): -

buildscript { 

    repositories { 
     google() 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:3.0.0-alpha4' 


     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     google() 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 
+0

失敗の理由は何ですか? –

+0

API 21デバイスでアプリを実行するとどうなりますか? –

+0

@GabeSechanエラーがアンドロイドスタジオで「Apk couldnt install -0」と表示されます – Rishav

答えて

1

私は同じに会いました

Androidスタジオ2.3以降では、コードに影響するInstant Runがあります。私の場合は

無効にインスタント実行

File -> Settings -> Build, Execution, Deployment -> Instant Run 

それは完璧な仕事をしていた、私は、これはあなたを助けることを願っています。

+0

悪いインスタント・ランと報告バック。しかし、私のアプリを輸出しても問題は解決されないので、それは無関係であってはならない。 :( N btw Androidスタジオ3.0 canary 4を使用しています – Rishav

関連する問題