Обертывание apk с помощью MDX ToolKit - не удалось объединить ресурсы из ManagedApp - PullRequest
0 голосов
/ 30 апреля 2018

Я пытался создать сборку с помощью Citrix - MDX ToolKit, который принимает файл .apk и генерирует файл .mdx, который можно экспортировать с помощью Mobile Device Management, используемого многими организациями для защиты данных своих приложений.

Попробовал:

  • Android Studio создает сборку без каких-либо претензий даже путем ограничения проверок ворса. Хотя это может выдать предупреждение, но, конечно, не касается strings и их дубликатов.

Получение следующей ошибки при преобразовании инструмента .apk с MDX ToolKit

E: Failed to merge resources from ManagedApp

Ниже приведен журнал ошибок:

 Unpacking app: App-production-release...
 -------------------------------------------------------------------------
 I: Using Apktool 2.3.1 on App-production-release.apk
 I: Loading resource table...
 I: Decoding AndroidManifest.xml with resources...
 I: Loading resource table from file: 
 /Users/abc/Library/apktool/mdx/framework/2.3.1/1.apk
 I: Regular manifest package...
 I: Decoding file-resources...
 I: Decoding values x/x XMLs...
 I: Copying raw classes.dex file...
 I: Copying assets and libs...
 I: Copying unknown files...
 I: Copying original files...



 Analyzing app...
 -------------------------------------------------------------------------
 I: Loading classes.dex
 I: Moved application code to classes2.dex
 I: Non-Intune application.
 I: Added ManagedApp as classes.dex
 I: Added library: lib/x86/liblog4cpp.so
 I: Added library: lib/x86/libctxlog.so
 I: Added library: lib/x86/libmdxlib.so
 I: Added library: lib/armeabi-v7a/libDataProtection.so
 I: Added library: lib/armeabi-v7a/libfullsslsdk.so
 I: Added library: lib/armeabi-v7a/libCtxTFE.so
 I: Added library: lib/armeabi-v7a/liblog4cpp.so
 I: Added library: lib/armeabi-v7a/libctxlog.so
 I: Added library: lib/armeabi-v7a/libmdxlib.so
 I: Added library: lib/armeabi-v7a/libctxjni.so
 I: Added library: lib/armeabi-v7a/libns-gateway.so
 I: Added library: lib/armeabi/libDataProtection.so
 I: Added library: lib/armeabi/libfullsslsdk.so
 I: Added library: lib/armeabi/libCtxTFE.so
 I: Added library: lib/armeabi/liblog4cpp.so
 I: Added library: lib/armeabi/libctxlog.so
 I: Added library: lib/armeabi/libmdxlib.so
 I: Added library: lib/armeabi/libctxjni.so
 I: Added library: lib/armeabi/libns-gateway.so
 I: Adding asset file assets/pac/pac.js
 I: Added Resources from assets/mdx/frameworks/0/org.apache.http.legacy.jar
 I: No AndroidManifest to merge from 
 assets/mdx/frameworks/0/org.apache.http.legacy.jar
 I: Added Manifest elements from 
 assets/mdx/frameworks/0/org.apache.http.legacy.jar
 I: Added optional library assets/mdx/frameworks/0/org.apache.http.legacy.jar
 I: Skipped adding optional library assets/mdx/frameworks/1/adal/gson- 
 2.2.4.jar
 I: Skipped adding optional library assets/mdx/frameworks/1/adal/adal- 
 1.11.0.jar
 I: Added Resources from assets/mdx/frameworks/1/support/support-fragment- 
 25.3.1.jar
 I: Added Manifest elements from assets/mdx/frameworks/1/support/support- 
 fragment-25.3.1.jar
 I: Added optional library assets/mdx/frameworks/1/support/support-fragment- 
 25.3.1.jar
 I: Added Resources from assets/mdx/frameworks/1/support/support-core-utils- 
 25.3.1.jar
 I: Added Manifest elements from assets/mdx/frameworks/1/support/support-core- 
 utils-25.3.1.jar
 I: Added optional library assets/mdx/frameworks/1/support/support-core-utils- 
 25.3.1.jar
 I: Added Resources from assets/mdx/frameworks/1/support/support-core-ui- 
 25.3.1.jar
 I: Added Manifest elements from assets/mdx/frameworks/1/support/support-core- 
 ui-25.3.1.jar
 I: Added optional library assets/mdx/frameworks/1/support/support-core-ui- 
 25.3.1.jar
 I: Added Resources from assets/mdx/frameworks/1/support/support-media-compat- 
 25.3.1.jar
 I: Added Manifest elements from assets/mdx/frameworks/1/support/support- 
 media-compat-25.3.1.jar
 I: Added optional library assets/mdx/frameworks/1/support/support-media- 
 compat-25.3.1.jar
 W: Resource collision after merging 
 assets/mdx/frameworks/1/support/appcompat-v7-25.3.1.jar
 /Users/abc/Apps/dd9ded47-48fa-4e5e-8cff-d07571d3b70e/res/values- 
 af/values-af_ctx6.xml:3: error: Resource entry 
 abc_action_bar_home_description is already defined.
 /Users/abc/Apps/dd9ded47-48fa-4e5e-8cff-d07571d3b70e/res/values- 
 af/strings.xml:3: Originally defined here.

 /Users/abc/Apps/dd9ded47-48fa-4e5e-8cff-d07571d3b70e/res/values-af/values- 
 af_ctx6.xml:4: error: Resource entry abc_action_bar_home_description_format 
 is already defined.
 /Users/abc/Apps/dd9ded47-48fa-4e5e-8cff-d07571d3b70e/res/values- 
 af/strings.xml:4: Originally defined here.

1 Ответ

0 голосов
/ 02 октября 2018

Обновление MDXToolkit до версии 10.8.60 решило проблему (больше никаких сбоев).

...