0

I have developed android app which it works fine for my samsung note 3 android 5.0 but when I have tried to install it on two devices (Samsung S7 and Sony Z5)with marshmallow 6.0.1 it crashes. Below is the build gradle:

Complete Gradle


apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion '24.0.2'
defaultConfig {
applicationId "com.example.user.cellularnetworkinfor_v8"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),     'proguard-rules.pro'
}
}
productFlavors {
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile files('libs/opencsv-3.7.jar')
  }

**********************************Manifest***************************

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

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>


<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>

3
  • 1
    Could you post stack trace? Dec 12, 2016 at 12:34
  • add you complete gradle and post what error you get
    – Vadivel
    Dec 12, 2016 at 12:36
  • you should look into the stacktrace Dec 12, 2016 at 12:39

3 Answers 3

0

That might be because of some dangerous permission , You have to specify runtime permission from android 6.0 , some example of dangerous permissions are Access_fine_location,read and writememory etc,

To confirm it please post your logcat here

0

This may be because of feature of Android M How to ask permission runtime alternatively for checking permission issue you can specify manually from settings -> Apps -> Configure Apps in android M Device.

Also refer this post Marshallow changing permissions at run time crashes app

0

You need to take RunTimePermission
See This how to take Permission runtime https://stackoverflow.com/a/34722591/4741746

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.