Reputation: 139
I have a problem is with installing my application on random devices. The app works on my phone (Android 6.0) and on emulator (7.1.1), but it can't be installed on friends' phones with e.g. same Android version or 5.0 probably. Is there any IDE-side reason (IntelliJ IDEA, earlier Android Studio with same error)?
There is fragment of build.gradle
in my project. Maybe it'll help somehow...
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.pkgname"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "Pre-release"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
}
pre_release {
minifyEnabled true
zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Greetings!
Upvotes: 0
Views: 36
Reputation: 63
Will you please let us know whether you're trying to use the build apk generated at the time of installing app directly to your know or you are creating a fresh build.
Note: if you want to support all devices as per your build config then you must have you create a clean build and then try to install app within your required devices.Hope it will help.
Upvotes: 1
Reputation: 26
Just you make debug-version your .apk. Look at - https://techtuts.info/2014/05/build-release-apk-android-studio/
Upvotes: 1