buildTypes {
release {
minifyEnabled true
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
프로가드 활성화해서 apk파일을 만들고, 앱을 실행시키는 과정에서
JNI DETECTED ERROR IN APPLICATION: JNI GetJavaVM called with pending exception java.lang.NoSuchMethodError: no non-static mdethod ~~~
라는 JNI 관련 에러가 뜨면서 앱이 죽는다..
해결방법은
-keep public class TestClass.** {*;}
-dontnote TestClass
-keep class com.test.testClass.** {*;}
proguard-rules.pro에 이렇게 작성해줬더니 잘 실행됐다.!!
320x100
'프로그래밍 > Android-Java' 카테고리의 다른 글
[ANDROID] camera preview frame byte array to bitmap (0) | 2020.10.19 |
---|---|
[ANDROID] Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug' (0) | 2020.10.16 |
[ANDROID] Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $ (0) | 2020.10.16 |
[JAVA] 소수점 반올림 (0) | 2020.09.08 |
[JAVA] list 내 원소 내림차순 정렬 (0) | 2020.09.07 |
댓글