Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My app crashes after updating in Android 9(Pie)

Yesterday my phone got updated to Android 9 and by that time my app started crashing. I reinstalled it from the Android Studio, but the problem is still the same. Below is the Manifest code to see if there is any problem. Thank you.

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

    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.READ_CALL_LOG" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <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:roundIcon="@mipmap/ic_launcher_round"
        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>

        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_maps_key" />

    </application>

</manifest>
like image 512
Edward M Avatar asked Dec 16 '18 12:12

Edward M


1 Answers

use this line in your into AndroidManifest.xml inside the <application> tag

    <application>
       ....
     .... android:usesCleartextTraffic="true"

 <uses-library
        android:name="org.apache.http.legacy"
        android:required="false" />

    </application>
like image 162
Abhay Pratap Avatar answered Sep 30 '22 12:09

Abhay Pratap