hui-z / flutter_install_plugin

A flutter plugin for install apk for android; and using url to go to app store for iOS.
MIT License
96 stars 105 forks source link

PlatformException(NullPointerException, Attempt to invoke virtual method 'android.content.res.XmlResourcePars #26

Closed chrystoffer closed 8 months ago

chrystoffer commented 4 years ago

I am having trouble working on devices. In genymotion it works normal, but in my device I can't make it work.

install apk error: PlatformException(NullPointerException, Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.PackageItemInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference, null)

The apk file is in the correct folder, there are permissions but it does not install. My manifest: `<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.vigilancia">

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
    android:name="io.flutter.app.FlutterApplication"
    android:label="vigilancia"
    android:icon="@mipmap/ic_launcher">
    <activity
        android:name=".MainActivity"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
        android:hardwareAccelerated="true"
        android:windowSoftInputMode="adjustResize">
        <meta-data
            android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
            android:value="true" />
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
</application>

`

Can someone help me?