https://kotlinlang.org logo
#android
Title
# android
j

Joey

03/30/2020, 2:14 AM
App crashes when doing
Copy code
class MainActivity : AppCompatActivity() {
    companion object {
        init {
            System.loadLibrary("encrypt")
        }
    }
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        tv_cipher.text = encryptString("test")
    }

    external fun encryptString(plaintext: String): String
}
Anything wrong? Library is already inside their respective architectures under
src/main/jniLibs/<archi>
google 3
stackoverflow 2
t

tateisu

03/30/2020, 4:11 AM
does your app binary (open with zip file manager ) contains
.so
file with expected name ?
j

Joey

03/30/2020, 5:10 AM
I dont know how to open app as zip in ubuntu. But as when i do Build APK > Analyze
The .so files are inside their libs/archi
Error thrown is
has unexpected e_machine: 62 (EM_X86_64)
v

Victor

03/30/2020, 6:51 AM
it looks like your library encrypt doesn’t support the current architecture of you device
j

Joey

03/30/2020, 7:29 AM
Stackoverflow link here.
14 Views