2016-12-12 76 views
-3

我已經開發的Android應用程序,它適用於我的三星注3 android 5.0,但是當我試圖將它安裝在兩個設備(三​​星S7和索尼Z5)與棉花糖6.0。 1它崩潰。下面是構建gradle這個:應用程序在棉花糖運行時崩潰6.0.1

完全搖籃


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') 
    } 

**************************** ******清單***************************

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

+1

你能張貼堆棧跟蹤? –

+0

添加你完成gradle併發布你得到的錯誤 – Vadivel

+0

你應該看看堆棧跟蹤 –

回答

0

這也許是因爲一些危險的權限,你必須從android 6.0指定運行時權限,例如o ˚F危險的權限是ACCESS_FINE_LOCATION,閱讀和writememory等,

要確認它,請張貼在這裏

相關問題