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

Crashing on Android 7.1.1_r4 #3

Open
JaredTamana opened this issue Jan 10, 2017 · 7 comments
Open

Crashing on Android 7.1.1_r4 #3

JaredTamana opened this issue Jan 10, 2017 · 7 comments

Comments

@JaredTamana
Copy link

Hi,

I have a Nexus 5X. It is currently running the Pure Nexus AOSP custom ROM, based on Android 7.1.1. I'm able to connect it to a PC, but if I interact with the app after touching, the app will crash. I'm willing to provide logs if needed and possible.

Device: bullhead
ROM: Pure Nexus, December build, rooted
Side version: Slide Free 2.52

@aetha
Copy link

aetha commented May 22, 2017

I'm getting this exact same problem on Android 7.0, latest stock ROM on a Nvidia Shield tablet.

I used adb logcat to get more info, and I'm seeing NetworkOnMainThreadException being thrown. I think this might be why:

https://developer.android.com/about/versions/nougat/android-7.0-changes.html#other

Due to a bug in previous versions of Android, the system did not flag writing to a TCP socket on the main thread as a strict-mode violation. Android 7.0 fixes this bug. Apps that exhibit this behavior now throw an android.os.NetworkOnMainThreadException

A quick fix would be to just disable this strict mode. I think this code would do it(?)
StrictMode.setThreadPolicy(StrictMode.ThreadPolicy.Builder().permitNetwork().build());

@Cheerfultrout
Copy link

@aetha just tried that with my fork of the project, and it works on android 7.0+ now. (There are some other issues that I'm working on still, but at least it doesn't crash)

@TheArcaneBrony
Copy link

TheArcaneBrony commented Dec 27, 2017

@Cheerfultrout download?
EDIT: Nvm, got it to compile!
If anyone in the future needs the APK, just ask!

@WinterJava
Copy link

Someone can share the apk that works in android 7?

@JaredTamana
Copy link
Author

@TheArcaneBrony @WinterJava Please learn to build from git clones instead of relying on releases. It will help you a lot here on GitHub

@WinterJava
Copy link

what program i should use? i need the apk

@Cheerfultrout
Copy link

I used Android Studio for the whole process, from cloning the repo, patching, and building the apk, see if you can get it to work in there? Should be various turorials online for how to.

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

No branches or pull requests

5 participants