Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

[okhttp]:check permission begin! [okhttp]:not mms! [okhttp]:not email

I am getting this error while using volly library in my android studio projecte while running the app in my emulator and real deivce ! How can i resolve this!

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

This error is coming because you had forgotten to connect your emulator / mobile device to the internet. Make Sure that your Internet or Wifi will be enabled! Because this type of library like volley needs internet Connection.

REASONS:-

  • Your Mobile / Emulator is not connected to the Internet

  • You had not been given Internet and Network state Permission in the Android
    Manifest File :

    Paste the below code in the android manifest file.

    <uses-permission android:name="android.permission.INTERNET" />

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

NOTE:- This tag should be placed BEFORE the application TAG. If you put if after application TAG, it produces a warning.

MANIFEST FILE AFTER ADDING CODE

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

package="app.com.example.android.sunshine" >

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

Thanks!

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading