Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlatformException(FAILED_TO_CHECK_PERMISSIONS, , NULL_ACTIVITY, null) #60

Closed
enviro-apps opened this issue Dec 18, 2020 · 8 comments
Closed
Labels
android Android related issue

Comments

@enviro-apps
Copy link

enviro-apps commented Dec 18, 2020

Hello, my Manifest looks like this on Android but I get a Permission error any ideas?

<!-- io.flutter.app.FlutterApplication is an android.app.Application that
     calls FlutterMain.startInitialization(this); in its onCreate method.
     In most cases you can leave this as-is, but you if you want to provide
     additional functionality it is fine to subclass or reimplement
     FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />

 
<application
    android:name="io.flutter.app.FlutterApplication"
    android:label="Vote"
    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">
        <!-- This keeps the window background of the activity showing
             until Flutter renders its first frame. It can be removed if
             there is no splash screen (such as the default splash screen
             defined in @style/LaunchTheme). -->
        <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>
@g-apparence
Copy link
Collaborator

Hello,
is that a new project or an old one?
(if your project use the old android plugin version, you'll have to recreate the android folder)

@g-apparence g-apparence added the android Android related issue label Dec 18, 2020
@g-apparence g-apparence added this to backlog in board Dec 19, 2020
@g-apparence g-apparence moved this from backlog to To do in board Dec 19, 2020
@g-apparence g-apparence removed this from To do in board Dec 19, 2020
@salvatoredimaio
Copy link

I created a new project, but I still have the same problem too: PlatformException (FAILED_TO_CHECK_PERMISSIONS,, NULL_ACTIVITY, null).
Tested on Zenfone4, Android 8.1.0

@g-apparence
Copy link
Collaborator

Hi, will try this when returning from vacation.

  • Could you post the part of your code running the plugin
  • You can also try running example to see if it's working on your phone

@salvatoredimaio
Copy link

Hi, I ran the example (in debug) but only at the start I always get the same exception (PlatformException (FAILED_TO_CHECK_PERMISSIONS ,, NULL_ACTIVITY, null). If I keep giving run, the camera is working.
In release mode the example is working.

@g-apparence
Copy link
Collaborator

Hi,
will fix this fast if I can reproduce it.

@g-apparence
Copy link
Collaborator

g-apparence commented Jan 4, 2021

Tested on Android 8.1, seems related to Asus as it works perfectly.
Trying to find an Asus phone.

@aakashbapna
Copy link

Happens on One Plus 3 as well.

@g-apparence
Copy link
Collaborator

Ok, thanks reporting this.
Seems related to old devices, maybe the flutter binding use the old version on older devices.
I'm investigating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Android related issue
Projects
None yet
Development

No branches or pull requests

4 participants