• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Update mock_android.jar
2
3## Build mock_android.jar
4
5First, use set up instructions from layoutlib tutorial to make commands like `m` work.
6
7Then, run the following in the repository root:
8
9```
10m mock_android
11mv out/host/linux-x86/framework/mock_android.jar frameworks/layoutlib/create/tests/res/data/mock_android.jar
12```
13
14## Build problems
15
16If you see a build error like:
17
18```
19[ 29% 351/1203] including frameworks/layoutlib/out/test/create/mock_data/Android.mk ...
20FAILED:
21build/make/core/base_rules.mk:325: error: frameworks/layoutlib/out/test/create/mock_data: MODULE.linux.JAVA_LIBRARIES.mock_android already defined by frameworks/layoutlib/create/tests/res/mock_data.
2216:26:52 ckati failed with: exit status 1
23```
24
25a quick solution would be to remove `frameworks/layoutlib/out/test/create/mock_data/Android.mk`.
26