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

Fix Android 7.1 support #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# ArtHook

## Troubleshooting
In case an error like this happens:

More than one file was found with OS independent path 'lib/armeabi-v7a/libarthook_native.so'

Execute the following:

gradlew --stop
gradlew cleanBuildCache
gradlew clean
11 changes: 4 additions & 7 deletions lib/src/main/java/de/larma/arthook/avers/VersionHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,15 @@
import de.larma.arthook.ArtMethod;

import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.LOLLIPOP;
import static android.os.Build.VERSION_CODES.LOLLIPOP_MR1;
import static android.os.Build.VERSION_CODES.M;
import static android.os.Build.VERSION_CODES.N;
import static android.os.Build.VERSION_CODES.O;
import static android.os.Build.VERSION_CODES.*;

public abstract class VersionHelper {
private static final boolean VERSION_LMR0 = SDK_INT == LOLLIPOP;
private static final boolean VERSION_LMR1 = SDK_INT == LOLLIPOP_MR1;
private static final boolean VERSION_L = VERSION_LMR0 || VERSION_LMR1;
private static final boolean VERSION_M = SDK_INT == M;
private static final boolean VERSION_M_PLUS = SDK_INT >= M;
private static final boolean VERSION_N = SDK_INT == N;
private static final boolean VERSION_N_PLUS = SDK_INT >= N;
private static final boolean VERSION_N_PLUS = SDK_INT == N_MR1;
private static final boolean VERSION_O = SDK_INT == O;
private static final boolean VERSION_O_PLUS = SDK_INT >= O;

Expand All @@ -46,6 +41,8 @@ public abstract class VersionHelper {
: VERSION_LMR1 ? new LMR1()
: VERSION_M ? new M()
: VERSION_N ? new N()
: VERSION_N_PLUS ? new N()
: VERSION_O ? new O()
: VERSION_O_PLUS ? new O()
: null;

Expand Down