Comments (6)
it should be fixed with 0.1.10
from let.
Same problem in my app, crashing on Android N devices. I am asking for:
@AskPermission({Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.WRITE_EXTERNAL_STORAGE})
And the crash looks like this:
java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String[] com.canelmas.let.AskPermission.value()' on a null object reference
at com.canelmas.let.RuntimePermissionRequest.proceed(RuntimePermissionRequest.java:61)
at com.canelmas.let.RuntimePermissionRequest.proceed(RuntimePermissionRequest.java:52)
at com.canelmas.let.LetAspect.ajc$inlineAccessMethod$com_canelmas_let_LetAspect$com_canelmas_let_RuntimePermissionRequest$proceed(LetAspect.java:1)
at com.canelmas.let.LetAspect.annotatedMethods(LetAspect.java:57)
at com.mendhak.gpslogger.ui.fragments.display.GenericViewFragment.requestToggleLogging(GenericViewFragment.java:98)
at com.mendhak.gpslogger.ui.fragments.display.GpsSimpleViewFragment$1.onClick(GpsSimpleViewFragment.java:101)
at android.view.View.performClick(View.java:5565)
at android.view.View$PerformClick.run(View.java:22047)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5849)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:763)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:653)
from let.
@olsontl @mendhak hey, thanks for reporting. I'm also able to reproduce the crash.
I believe the issue is related to the retention policy set to RetentionPolicy.CLASS
for @AskPermission
To be honest, I don't really remember what was I really thinking when I changed it from Runtime to Class in the first place. I will fix it in a day.
But the thing is I'm having trouble understanding why it's working on pre-N and not on N.
from let.
Looks good. Thanks!
from let.
It seems that retention policies are not being honored in certain cases; which is fixed and should be expected with the upcoming new N releases.
You can check official issue here : https://code.google.com/p/android/issues/detail?id=203109
from let.
this problem still happens on 0.1.11:
Process: com.craftlog.android.cooking, PID: 14695
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.annotation.Annotation java.lang.reflect.Method.getAnnotation(java.lang.Class)' on a null object reference
at com.canelmas.let.RuntimePermissionRequest.proceed(SourceFile:61)
at com.canelmas.let.RuntimePermissionRequest.proceed(SourceFile:52)
at com.canelmas.let.LetAspect.ajc$inlineAccessMethod$com_canelmas_let_LetAspect$com_canelmas_let_RuntimePermissionRequest$proceed(SourceFile:1)
at com.canelmas.let.LetAspect.annotatedMethods(SourceFile:57)
it started happening after we disabled D8 compiler.
Do you think this library should never crash? Maybe a big-O try/catch will be necessary, regardless of android bugs.
from let.
Related Issues (20)
- Memory leak detected by LeakCanary HOT 2
- Leaked Activity instance HOT 3
- onPermissionDenied() never called HOT 2
- Let will only execute the annotated method the second time it's called HOT 1
- com.canelmas.let.LetException: Delayed Execution Failed! HOT 2
- Use with Kotlin HOT 5
- Asking for permission before starting a download session with download manager brings "Screen overlay detected" screen on Samsung Devices (Tested with s6 and s7) HOT 1
- Loss data after rotation.
- Logger flooding
- permission dialog will not trigger in release apk but works fine in debug
- Request a permission causes a crash in Android O HOT 3
- Use Transform API
- Button set text not working when method has @AskPermission annotation
- Permission alert not showing once use Java 8 compileoptions
- Problems using with Android Library
- Add Instant App support
- Build time significantly increased?
- Canelmas not working while adding Firebase Performance library . if i remove firebase_pref , it wokring
- let-plugin: build.gradle should use 'implementation' instead of 'compile'
- Let beta wrong dependency included
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from let.