Android Studio 3.1로 업데이트 한 이후로 build과정중에 지원하지 않는 abi에 대한 빌드 에러가 발생한다.


org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sample:transformNativeLibsWithStripDebugSymbolForNaverBetaDebug'.

Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'C:\Android\sdk\ndk-bundle\toolchains\mips64el-linux-android-4.9\prebuilt\windows-x86_64\bin\mips64el-linux-android-strip''


1.첫번째는 ndk 변경으로 인한 abi 지원 문제인데

AndroidStudio 3.1에서 지원하는 ndk의 최소 버전이 r17로 변경되었는데 r17부터는 armeabi을 지원하지 않는다. 

그래서 armeabi에 대한 abi를 제거해야 한다.


build.gradle

defaultConfig {

...

   ndk {

            abiFilter 'armeabi-v7a'

        }

}



2. 두번째는 제목과 같은 mips64el toolchain을 찾을수 없다는 에러가 발생하게 되는데 이건 정확한 문제 해결 방법을 모르겠다.

r16에 mips toolchain을 복사해서 해결한 경우도 있는데 이건 나중에 업데이트 할때 문제가 될수도 있을것 같아서 그냥 ndk만 r16으로 변경했다.

local.properties

ndk.dir=C\:\\Android\\ndk\\android-ndk-r16b


Happy Coding~:)

android databinding architecture를 테스트하다 겪은 여러가지 실수에 대해서 정리해 본다.


data Binding을 사용하기 위해서는 build.gradle 에 다음과 같이 추가해야 하는걸 잊지 말자

android { ... dataBinding { enabled = true } }

1. Binding Class 이름 규칙을 잘 기억하자

BindingClass의 이름은 activity xml파일명을 Camel case로 변경한 것이다.

activity_main.xml인 경우 AndroidMainBinding이다, MainActivityBinding이 아니다

ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);


2. root element는 <layout>이다

이제 기존 ui layout(eg. ConstraintLayout)은 root element인 'layout' 내에 포함되어야 한다.

<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
>
...
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">


3. <data>선언을 nested layout에 포함시키지 말자.

data은 root element인 'layout' 의 child에 존재한다.

<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
>

<data>
<variable name="hello" type="works.papa.labs.databindingtest.binding.Hello"/>
</data>

<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

Happy Coding~!


keytool -genkey -v -keystore cjkeystore.jks -storepass password -alias releasekey -keypass password -keyalg RSA -keysize 2048 -validity 10000 -dname "cn=Rookiecj, ou=MyTeam, o=MyCompany, c=KR"




안드로이드 boot.img에서 rootfs와 kernel을 파싱하는 툴입니다.  kernel과 rootfs를 이용해서 boot.img를 만드는부분은 지원하지 않는다.
  음 언젠가 필요하면 하겠지.. ㅋ


Happy Coding~:)

+ Recent posts