App crashed when send via third party app like bluetooth - android

App is crashed when send via shareit but run on the device by usb debugging. This problem occurs after updating my Android Studio plugins, version etc.
module:app file
apply plugin: 'com.android.application'android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.sonu.check"
minSdkVersion 14
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
}

Related

Device Compatibility of my app

I created an Android application, but I cannot view it on play store and when I access it from web play store I found that:
Cette application n'est pas compatible avec votre appareil.
I don't know the reason of that
here is my build file
apply plugin: 'com.android.application'
android {
compileSdkVersion 17
buildToolsVersion '21.0.0'
compileOptions.encoding "ISO-8859-1"
defaultConfig {
applicationId "com.commande.soqop"
minSdkVersion 15
targetSdkVersion 18
versionCode 3
versionName "1.2"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
aaptOptions{
cruncherEnabled = false
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
}
I have tested on Samsung Tab 4 (Android 5.0) and Samsung S5 (Android 6)
How can I fix this issue?
Increase the targetSdkVersion of your app. The devices on which you tested might be above the version you mentioned in build.gradle.
Replace target SDK with the latest one :
apply plugin: 'com.android.application'
android {
compileSdkVersion 17
buildToolsVersion '26.0.2'
compileOptions.encoding "ISO-8859-1"
defaultConfig {
applicationId "com.commande.soqop"
minSdkVersion 15
targetSdkVersion 26
versionCode 3
versionName "1.2"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
aaptOptions{
cruncherEnabled = false
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
}
It will almost certainly be something in your manifest settings. Can you edit your question to show your AndroidManifest.xml?

App errors even when its a new empty project

The app works when I build it in my phone using Android Studio. But when I send it to low sdk device it doesn't work even when its sdk <=14
like Samsung s3 or s2.
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.pc.zaid.zzz"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
}

android plugin issue, asks to update, but already updated all

I know this has been asked before as well, but I have done all I can.
I have updated all I can from SDK manager, but still I am getting this issue with my project that I just created.
There is no functionality I have given yet, but the issue says the plugin is too old, please update or change the ANDROID_DAILY_ENVIRONMENT variable.
This is my gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.manav.loginapp"
minSdkVersion 21
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha1'
}

App won't run unless you update google play services - Android Studio

Im currently using android studio 1.5. My problem is when I try to run my google maps activity in my emulator, it kept showing the prompt "App wont run unless you update google play services". What now?
Here is my Build.gradle
apply plugin: 'com.android.application'
android
{
compileSdkVersion 21
buildToolsVersion "23.0.2"
defaultConfig
{
applicationId "com.farmmanagementsystem.farmmanagementapp"
minSdkVersion 19
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes
{
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services:8.3.0'
}

WearableListenerService onMessageReceived will not get fired [android wear]

I am trying to send to send a message from handheld to wear-emulator,
(according to this tutorial).
Unfortunately my WearableListenerService.onMessageReceived doesn't get called.
Here on SO I have read it could be somehow related with gradle.build file,
my gradle.build in 'mobile' module (handheld):
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example.benji.data"
minSdkVersion 15
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
wearApp project(':wear')
compile 'com.google.android.gms:play-services-wearable:+'
}
my gradle.build in 'wear' module:
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example.benji.data"
minSdkVersion 20
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.support:wearable:+'
compile 'com.google.android.gms:play-services-wearable:+'
}
I have everything else set up as it is in the previously mentioned tutorial.
Thanks for any possible answers
Problem relies in modules start order, first launch Handheld module app, and THEN wear emulator app, not vice-versa as I did before :)
It's work for me
If you use Proguard to protect your apk , you need to ensure that the Gson class won't be Proguard, If you use the Gson class
Like this
ProGuard for Android and GSON
Then you must ensure that the apk on your phone and wear must have the same signature, in other word, you need to use the same KeyStore file to export the singed APK.

Categories

Resources