Das ist jetzt sehr merkwürdig. Egal, welches Projekt es ist, meine Android-App wird nicht auf anderen Roms laufen, sondern nur auf API 25. Die Standard-App hello world
wird sogar nicht auf einer anderen API laufen. Im Grunde schlägt die apk-Installation auf jedem anderen Rom fehl, außer auf denen, die auf Nougat basieren.
Mein minsdkversion
ist 21, obwohlAndroid Apps laufen nur auf API 25
Hier die build.gradle ist (Modul: app)
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 (Projekt): -
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
}
Was ist der Fehler Grund? –
Was passiert, wenn Sie eine App auf einem API 21-Gerät ausführen? –
@GabeSechan Fehler zeigt in androiden Studio sagen "Apk konnte nicht installieren-0" – Rishav