fixed android example

This commit is contained in:
strawmanbobi
2019-07-19 07:40:59 +08:00
parent 5e47ef0004
commit e34f3df64a
10 changed files with 6 additions and 9 deletions

View File

@@ -1 +1,2 @@
/build /build
/debug

View File

@@ -6,7 +6,7 @@ buildscript {
google() google()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.4.1' classpath 'com.android.tools.build:gradle:3.4.2'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
} }

View File

@@ -2,7 +2,6 @@ apply plugin: 'com.android.library'
android { android {
compileSdkVersion 27 compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig { defaultConfig {
minSdkVersion 19 minSdkVersion 19

View File

@@ -18,6 +18,10 @@ public class IRDecode {
private static final String TAG = IRDecode.class.getSimpleName(); private static final String TAG = IRDecode.class.getSimpleName();
static {
System.loadLibrary("irdecode");
}
private static Object mSync = new Object(); private static Object mSync = new Object();
private native int irOpen(int category, int subCate, String fileName); private native int irOpen(int category, int subCate, String fileName);
@@ -47,12 +51,6 @@ public class IRDecode {
return mInstance; return mInstance;
} }
private IRDecode() {
String libPath = "/data/irext/libirda_decoder.so";
System.out.println("loading decode library " + libPath);
System.load(libPath);
}
public int openFile(int category, int subCate, String fileName) { public int openFile(int category, int subCate, String fileName) {
return irOpen(category, subCate, fileName); return irOpen(category, subCate, fileName);
} }

View File

@@ -4,7 +4,6 @@ android {
signingConfigs { signingConfigs {
} }
compileSdkVersion 27 compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig { defaultConfig {
minSdkVersion 19 minSdkVersion 19
targetSdkVersion 27 targetSdkVersion 27