Hi,Subbu
As we know if compile app with android studio to support data-binding, we only need to add
dataBinding { enabled true }
in build.gralde.
But how to enable android data-binding in Android.mk if we want to compile app with AOSP? Thanks.
Hi,
What's the Android version you are using?
I’m not sure how much I can help as I haven’t done it before.
I believe DataBinding should be enabled from 'build.gradle' file. In Android.mk file, you should declare the dependencies.
Check it out this link:
androidxref.com/6.0.1_r10/xref/fra...
From my observation of this app,
It uses,
In Project level gradle file,
classpath "com.android.databinding:dataBinder:${config.version}”
In App level gradle file,
apply plugin: ‘com.android.databinding'
By looking at the module definition of data-binding library,
And something interesting I found from this SO question,
stackoverflow.com/questions/481139...
I would imagine, you might need to reference the libraries in your make file.
com.android.databinding:adapters com.android.databinding:baseLibrary com.android.databinding:library
This is what we did in one of our apps to have appcompat support.
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-appcompat \ android-support-v4 LOCAL_MANIFEST_FILE := app/src/main/AndroidManifest.xml LOCAL_SRC_FILES := $(call all-java-files-under, app) LOCAL_RESOURCE_DIR += $(LOCAL_PATH)/app/src/main/res \ frameworks/support/v7/appcompat/res LOCAL_AAPT_FLAGS := \ --auto-add-overlay \ --extra-packages android.support.design \ --extra-packages android.support.v7.appcompat
Similar to this there should be a way to add the DataBinding libraries as well.
Sorry It took long to respond.
HI Subbu,could you give me a demo about how to support databinding in AOSP. Thanks very much
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi,Subbu
As we know if compile app with android studio to support data-binding, we only need to add
in build.gralde.
But how to enable android data-binding in Android.mk if we want to compile app with AOSP? Thanks.
Hi,
What's the Android version you are using?
I’m not sure how much I can help as I haven’t done it before.
I believe DataBinding should be enabled from 'build.gradle' file. In Android.mk file, you should declare the dependencies.
Check it out this link:
androidxref.com/6.0.1_r10/xref/fra...
From my observation of this app,
It uses,
In Project level gradle file,
In App level gradle file,
By looking at the module definition of data-binding library,
androidxref.com/6.0.1_r10/xref/fra...
And something interesting I found from this SO question,
stackoverflow.com/questions/481139...
I would imagine, you might need to reference the libraries in your make file.
This is what we did in one of our apps to have appcompat support.
Similar to this there should be a way to add the DataBinding libraries as well.
Sorry It took long to respond.
HI Subbu,could you give me a demo about how to support databinding in AOSP.
Thanks very much