In make dist dist_ When compiling OTA package, dir = mydist encountered an error, which was not encountered in previous Android versions. Here is a record
error report content:
2021-07-02 09:53:29 - common.py - WARNING : Failed to read ODM/build.prop
2021-07-02 09:53:29 - add_img_to_target_files.py - ERROR :
ERROR:
Traceback (most recent call last):
File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 999, in <module>
File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 993, in main
File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 733, in AddImagesToTargetFiles
File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 701, in LoadInfoDict
build_info = BuildInfo(d)
File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 393, in __init__
self._device = self.GetOemProperty("ro.product.device")
File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 509, in GetOemProperty
return self.GetBuildProp(key)
File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 451, in GetBuildProp
return self._ResolveRoProductBuildProp(prop)
File "/home/xxxx/yourdevice_r_1.0_dev_0616/android/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 476, in _ResolveRoProductBuildProp
"Invalid ro.product.property_source_order '{}'".format(source_order))
**ExternalError: Invalid ro.product.property_source_order '['odm', 'vendor', 'product', 'product_services', 'system']'**
Analyze the corresponding common. Py code
common.py script
def _ResolveRoProductBuildProp(self, prop):
default_source_order = self._GetRoProductPropsDefaultSourceOrder()
source_order_val = self._GetRawBuildProp(
"ro.product.property_source_order", None)
source_order = source_order_val.split(",")
if any([x not in default_source_order for x in source_order]):
raise ExternalError(
"Invalid ro.product.property_source_order '{}'".format(source_order))#挂在这行
def _GetRoProductPropsDefaultSourceOrder(self):
...
return BuildInfo._RO_PRODUCT_PROPS_DEFAULT_SOURCE_ORDER_CURRENT
_RO_PRODUCT_PROPS_DEFAULT_SOURCE_ORDER_CURRENT = [
"product", "odm", "vendor", "system_ext", "system"]
Open systme.prop in the board
ro.product.property_source_order=odm,vendor,product,product_services,system
It can be seen that the two do not match, resulting in an error
modify the ro.product.property in system.prop_ source_ The content of the order property, so that the two are equal, the compiler will no longer report an error.
#ro.product.property_source_order=odm,vendor,product,product_services,system
ro.product.property_source_order=odm,vendor,product,system_ext,system
Read More:
- Stata Comment // Error / invalid name r(198); [How to Solve]
- [Solved] Failed to load property source from location ‘classpath:/application.yml‘
- [Solved] Notwritablepropertyexception: invalid property ‘mapperhelper’ of bean class
- [Solved] Android Compile and Package Error: Invalid keystore format
- [Solved] CCS compilation and debug error: Source lookup: unable to restore CPU specific source container – expecting valid source container id value.
- R language learning problem solving error in output $nodeid: $operator is invalid for atomic vectors
- [Solved] R Language Error: Error in RStudioGD() : Shadow graphics device error: r error 4 (R code execution error)
- Taro Error: chunk common [mini-css-extract-plugin] Conflicting order between: ……
- ADB ota Error: adb: failed to read command: No error
- [Solved] Android Studio Compile Error: Invalid main APK outputs : EarlySyncBuildOutput
- [Solved] Android Studio Start Error: Missing essential plugin: org.jetbrains.android Please reinstall Android
- [Vagrant] When vagrant up, it stops at “SSH auth method: private key” and times out.
- [Solved] Appium Error: InvalidArgumentException: Message: invalid argument: invalid locator
- [Solved] Android9.0 App Install Android4.4 Error: InflateException-You must supply a layout_height attribute.
- [Solved] SyntaxError: Invalid regular expression: invalid group specifier name
- [Solved] Android Error: import android.support.annotation.NonNull
- Maven compiles Scala and reports an error stackoverflowerror
- The SDK of Android webrtc compiled with Ninja – C out / release command reported an error, and the Android NDK processing method could not be found
- JZVideo Error: Attempt to invoke virtual method ‘android.view.Window android.app.Activity.getWindow()’ on a null object reference