hcohen
hcohen

Reputation: 325

Android studio not recognize the <uses-permission > entry in the AndroidManifest.xml

I created simple sms messaging app on android studio 1.5 (watch my eclipse app code on github), based on eclipse project which alredy works fine (watch my android studio app code on github)

When I run the android studio version , it's not recognize the permission , produce this error : Sending SMS message: uid 10166 does not have android.permission.SEND_SMS

I attach the android studio project manifest and gradle.build :

manifest :

<?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.findmee.myapplication5">
        <uses-permission android:name="android.permission.SEND_SMS"/>

        <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"
                android:label="@string/app_name"
                android:theme="@style/AppTheme.NoActionBar">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />

                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
        </application>

    </manifest>

the gradle.build :

>apply plugin: 'com.android.application'
>android {
>    compileSdkVersion 23
>    buildToolsVersion "23.0.2"
>
>    defaultConfig {
>        applicationId "com.findmee.myapplication5"
>        minSdkVersion 15
>        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.1.1'
>    compile 'com.android.support:design:23.1.1'
>}

>

Sorry about the ugly format of the grade code Thanks in advance!!

Upvotes: 1

Views: 1025

Answers (1)

hcohen
hcohen

Reputation: 325

I fount that , think it will be useful for other users who try do debug/deploy their apps on android 6.0 devices. The matter is you have to manualy enaple every permission to every app in youre 'apps' section on the setting on youre device.

Good luck!

Upvotes: 1

Related Questions