Error failed processing manifest

Issue I am new to Ionic, Android and Moodle, I have several errors when trying to generate a custom Moodle...

Issue

I am new to Ionic, Android and Moodle, I have several errors when trying to generate a custom Moodle apk, I come here for help for this error that is generated with the application ID.

Well, what I did was the following, I changed the original Moodle ID to my application, I was fixing errors with Grandle, I configured the SDK well, I linked the JDK, I built, compiled and transpiled very many times and that’s why now I only fit the command directly.

I suspect that it may be an error in the config.xml, I don’t know, or the folders created by changing the name of the id_app with the packages.

These errors appear in the console after executing cordova.cmd build android --release

[...]
> Task :app:processDebugResources
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  C:..moodleappplatformsandroidappbuildintermediatesmerged_manifestsdebugAndroidManifest.xml:76: AAPT: error: resource xml/provider_paths (aka com.mycustom.app:xml/provider_paths) not found.

  C:..moodleappplatformsandroidappbuildintermediatesmerged_manifestsdebugAndroidManifest.xml:85: AAPT: error: resource xml/camera_provider_paths (aka com.mycustom.app:xml/camera_provider_paths) not found.

  C:..moodleappplatformsandroidappbuildintermediatesmerged_manifestsdebugAndroidManifest.xml:99: AAPT: error: resource xml/opener_paths (aka com.mycustom.app:xml/opener_paths) not found.

  error: failed processing manifest.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 10s
 FAILED
23 actionable tasks: 1 executed, 22 up-to-date
C:..moodleappplatformsandroidgradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  C:..moodleappplatformsandroidappbuildintermediatesmerged_manifestsdebugAndroidManifest.xml:76: AAPT: error: resource xml/provider_paths (aka com.mycustom.app:xml/provider_paths) not found.

  C:..moodleappplatformsandroidappbuildintermediatesmerged_manifestsdebugAndroidManifest.xml:85: AAPT: error: resource xml/camera_provider_paths (aka com.mycustom.app:xml/camera_provider_paths) not found.

  C:..moodleappplatformsandroidappbuildintermediatesmerged_manifestsdebugAndroidManifest.xml:99: AAPT: error: resource xml/opener_paths (aka com.mycustom.app:xml/opener_paths) not found.

  error: failed processing manifest.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 10s
[ERROR] An error occurred while running subprocess cordova.

        cordova.cmd build android --buildFlag=-UseModernBuildSystem=0 exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

C:..moodleapp>_

My Moodle AndroidManifest.xml

<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" 
        android:versionCode="10000" 
        android:versionName="1.0" 
        package="com.mycustom.app" 
        xmlns:android="http://schemas.android.com/apk/res/android">
            [...more code...]
        <provider android:authorities="${applicationId}.darryncampbell.cordova.plugin.intent.fileprovider" 
        android:exported="false" 
        android:grantUriPermissions="true" 
        android:name="com.darryncampbell.cordova.plugin.intent.CordovaPluginIntentFileProvider">
            <meta-data android:name="android.support.FILE_PROVIDER_PATHS" 
            android:resource="@xml/provider_paths" />
        </provider>
        <provider android:authorities="${applicationId}.provider"
            android:exported="false" 
            android:grantUriPermissions="true" 
            android:name="org.apache.cordova.camera.FileProvider">
                <meta-data android:name="android.support.FILE_PROVIDER_PATHS" 
                android:resource="@xml/camera_provider_paths" />
        </provider>
            <meta-data android:name="firebase_analytics_collection_deactivated" 
            android:value="true" />
        <provider android:authorities="${applicationId}.opener.provider" 
            android:exported="false" 
            android:grantUriPermissions="true" 
            android:name="io.github.pwlin.cordova.plugins.fileopener2.FileProvider">
            <meta-data android:name="android.support.FILE_PROVIDER_PATHS" 
            android:resource="@xml/opener_paths" />
        </provider>
    </application>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>

I just want to generate the apk and the steps of the moodle documentation has nt been useful to me.

link Moodle App https://github.com/moodlehq/moodleapp

My Proyect https://github.com/sauta/moodleapp

Doc Moodle APP https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2#Building_for_Android_and_iOS

Solution

looks like you miss some files.

you need to add this ressources into your config.xml, but first find the files in the explorer and write to real path instead of res/xml/ .

Source :

https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#resource-file

<platform name="android">
  <resource-file src="res/xml/opener_paths.xml" target="res/xml/opener_paths.xml" />
  <resource-file src="res/xml/camera_provider_paths.xml" target="res/xml/camera_provider_paths.xml" />
  <resource-file src="res/xml/provider_paths.xml" target="res/xml/provider_paths.xml" />
</platform>

Answered By – BMW

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

#javascript #android #react-native

#javascript #Android #реагирует на собственный

Вопрос:

Я получаю эту ошибку при попытке создать приложение с использованием react native с использованием Google Maps. ошибка возникла после редактирования манифеста Android для включения ключа API. Это ошибка

 C:Usersx0zonDocumentsCPTR405carbooking>react-native run-android
info Starting JS server...
info Building and installing the app on the device (cd android amp;amp; gradlew.bat app:installDebug)...
> Task :app:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  C:Usersx0zonDocumentsCPTR405carbookingandroidappbuildintermediatesmerged_manifestsdebugAndroidManifest.xml:34: AAPT: error: attribute android:configchanges not found.

  C:Usersx0zonDocumentsCPTR405carbookingandroidappbuildintermediatesmerged_manifestsdebugAndroidManifest.xml:34: AAPT: error: attribute android:windowsoftinputmode not found.

  error: failed processing manifest.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 6s
23 actionable tasks: 1 executed, 22 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.
 

это манифест Android

 <manifest xmlns:android="http://schemas.android.com/apk/res/android" 
  package="com.carbooking">

    <uses-permission android:name="android.permission.INTERNET" />

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:allowBackup="false"
      android:theme="@style/AppTheme">
      <meta-data 
        android:name="com.google.android.geo.API_KEY" 
        android:value="API key intentionally removed />
      <activity 
        android:name=".MainActivity" 
        android:label="@string/app_name" 
        android:configchanges="keyboard|keyboardHidden|orientation|screenSize" 
        android:windowsoftinputmode="adjustResize">
        <intent-filter>
          <action android:name="android.intent.action.MAIN" />
          <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
    </application>

</manifest>
 

Я новичок в react и android studio, и я попробовал некоторые решения, связанные с внесением изменений в версию gradle в build.gradle, и у меня есть одноклассники, использующие тот же файл манифеста Android без проблем. Я потерян и сбит с толку.

Комментарии:

1. Попробуйте очистить проект, используя следующую команду cn android amp;amp; ./ gradlew clean

I’m trying to build my Unity Project to Android, and it keeps throwing me a Resource Link Fail error? This never happened in the 2017 and 2018 versions, why is it happening now?

I’m using the Unity-downloaded JDK and NDK, however I’m using a custom SDK from Android Studio because I’m building to an older Android API

Here is the full error

CommandInvokationFailure: Gradle build failed. 
C:/Program Files/Unity/Hub/Editor/2019.4.31f1/Editor/Data/PlaybackEngines/AndroidPlayerOpenJDKbinjava.exe -classpath "C:Program FilesUnityHubEditor2019.4.31f1EditorDataPlaybackEnginesAndroidPlayerToolsgradlelibgradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':launcher:processReleaseResources'.
> Android resource linking failed
  D:UnitySonic-Neo-HarmonySonicNeoHarmonyTempgradleOutlauncherbuildintermediatesmerged_manifestsreleaseAndroidManifest.xml:52: AAPT: error: attribute android:resizeableActivity not found.
      
  error: failed processing manifest.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 4s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
> Task :launcher:preBuild UP-TO-DATE
> Task :unityLibrary:preBuild UP-TO-DATE
> Task :unityLibrary:preReleaseBuild UP-TO-DATE
> Task :launcher:prepareLintJar
> Task :unityLibrary:checkReleaseManifest
> Task :unityLibrary:processReleaseManifest
> Task :unityLibrary:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:generateReleaseBuildConfig
> Task :unityLibrary:generateReleaseResValues
> Task :unityLibrary:generateReleaseResources
> Task :launcher:preReleaseBuild
> Task :launcher:compileReleaseAidl NO-SOURCE
> Task :launcher:compileReleaseRenderscript NO-SOURCE
> Task :launcher:checkReleaseManifest
> Task :launcher:generateReleaseBuildConfig
> Task :launcher:generateReleaseSources
> Task :launcher:mainApkListPersistenceRelease
> Task :launcher:generateReleaseResValues
> Task :launcher:generateReleaseResources
> Task :launcher:createReleaseCompatibleScreenManifests
> Task :unityLibrary:packageReleaseResources
> Task :launcher:processReleaseManifest
> Task :launcher:mergeReleaseResources
> Task :launcher:mergeReleaseShaders
> Task :launcher:compileReleaseShaders
> Task :launcher:generateReleaseAssets
> Task :launcher:validateSigningRelease
> Task :launcher:signingConfigWriterRelease
> Task :launcher:checkReleaseDuplicateClasses
> Task :launcher:mergeReleaseJniLibFolders
> Task :launcher:processReleaseJavaRes NO-SOURCE
> Task :unityLibrary:generateReleaseRFile
> Task :unityLibrary:prepareLintJar
> Task :unityLibrary:generateReleaseSources
> Task :unityLibrary:javaPreCompileRelease
> Task :launcher:processReleaseResources FAILED
> Task :unityLibrary:compileReleaseJavaWithJavac

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
25 actionable tasks: 25 executed
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <cdf6c87974604af79a3a65a0b3c0eebd>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <cdf6c87974604af79a3a65a0b3c0eebd>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <cdf6c87974604af79a3a65a0b3c0eebd>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <cdf6c87974604af79a3a65a0b3c0eebd>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <cdf6c87974604af79a3a65a0b3c0eebd>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <cdf6c87974604af79a3a65a0b3c0eebd>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <cdf6c87974604af79a3a65a0b3c0eebd>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <cdf6c87974604af79a3a65a0b3c0eebd>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <cdf6c87974604af79a3a65a0b3c0eebd>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <cdf6c87974604af79a3a65a0b3c0eebd>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <cdf6c87974604af79a3a65a0b3c0eebd>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <cdf6c87974604af79a3a65a0b3c0eebd>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <a259d3c004024353a2c217da97495055>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

This topic has been deleted. Only users with topic management privileges can see it.

  • I cannot deploy my app for Android. It just does not build and APK and always gives me this error:

    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':processDebugResources'.
    > Android resource linking failed
      Output:  /home/maydin/Desktop/PROJECTS/Qt/build-AppV2-Android_for_armeabi_v7a_Clang_Qt_5_12_1_for_Android_ARMv72-Debug/android-build/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml:39: error: 'orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density' is incompatible with attribute configChanges (attr) flags [locale=4, fontScale=1073741824, keyboard=16, keyboardHidden=32, layoutDirection=8192, mcc=1, mnc=2, navigation=64, orientation=128, screenLayout=256, screenSize=1024, smallestScreenSize=2048, touchscreen=8, uiMode=512].
      error: failed processing manifest.
      
      Command: /home/maydin/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.0-4818971-linux.jar/ebd8c363d5b5dfd0111c4ccf701edca0/aapt2-3.2.0-4818971-linux/aapt2 link -I
              /home/maydin/Android/sdk-tools-linux-4333796/platforms/android-21/android.jar
              --manifest
              /home/maydin/Desktop/PROJECTS/Qt/build-AppV2-Android_for_armeabi_v7a_Clang_Qt_5_12_1_for_Android_ARMv72-Debug/android-build/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml
              -o
              /home/maydin/Desktop/PROJECTS/Qt/build-AppV2-Android_for_armeabi_v7a_Clang_Qt_5_12_1_for_Android_ARMv72-Debug/android-build/build/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_
              -R
              @/home/maydin/Desktop/PROJECTS/Qt/build-AppV2-Android_for_armeabi_v7a_Clang_Qt_5_12_1_for_Android_ARMv72-Debug/android-build/build/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt
              --auto-add-overlay
              --java
              /home/maydin/Desktop/PROJECTS/Qt/build-AppV2-Android_for_armeabi_v7a_Clang_Qt_5_12_1_for_Android_ARMv72-Debug/android-build/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r
              --custom-package
              org.qtproject.example.AppV2
              -0
              apk
              --no-version-vectors
      Daemon:  AAPT2 aapt2-3.2.0-4818971-linux Daemon #0
      Output:  /home/maydin/Desktop/PROJECTS/Qt/build-AppV2-Android_for_armeabi_v7a_Clang_Qt_5_12_1_for_Android_ARMv72-Debug/android-build/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml:39: AAPT: error: 'orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density' is incompatible with attribute configChanges (attr) flags [locale=4, fontScale=1073741824, keyboard=16, keyboardHidden=32, layoutDirection=8192, mcc=1, mnc=2, navigation=64, orientation=128, screenLayout=256, screenSize=1024, smallestScreenSize=2048, touchscreen=8, uiMode=512].
          
      error: failed processing manifest.
      Command: /home/maydin/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.0-4818971-linux.jar/ebd8c363d5b5dfd0111c4ccf701edca0/aapt2-3.2.0-4818971-linux/aapt2 link -I
              /home/maydin/Android/sdk-tools-linux-4333796/platforms/android-21/android.jar
              --manifest
              /home/maydin/Desktop/PROJECTS/Qt/build-AppV2-Android_for_armeabi_v7a_Clang_Qt_5_12_1_for_Android_ARMv72-Debug/android-build/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml
              -o
    14 actionable tasks: 1 executed, 13 up-to-date
              /home/maydin/Desktop/PROJECTS/Qt/build-AppV2-Android_for_armeabi_v7a_Clang_Qt_5_12_1_for_Android_ARMv72-Debug/android-build/build/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_
              -R
              @/home/maydin/Desktop/PROJECTS/Qt/build-AppV2-Android_for_armeabi_v7a_Clang_Qt_5_12_1_for_Android_ARMv72-Debug/android-build/build/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt
              --auto-add-overlay
              --java
              /home/maydin/Desktop/PROJECTS/Qt/build-AppV2-Android_for_armeabi_v7a_Clang_Qt_5_12_1_for_Android_ARMv72-Debug/android-build/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r
              --custom-package
              org.qtproject.example.AppV2
              -0
              apk
              --no-version-vectors
      Daemon:  AAPT2 aapt2-3.2.0-4818971-linux Daemon #0
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
    
    * Get more help at https://help.gradle.org
    
    BUILD FAILED in 10s
    AAPT2 aapt2-3.2.0-4818971-linux Daemon #0: shutdown
    VCS Checkout Cache (/home/maydin/Desktop/PROJECTS/Qt/build-AppV2-Android_for_armeabi_v7a_Clang_Qt_5_12_1_for_Android_ARMv72-Debug/android-build/.gradle/vcsWorkingDirs) has not been cleaned up in 0 days
    Building the android package failed!
    10:30:58: The process "/home/maydin/Qt/5.12.1/android_armv7/bin/androiddeployqt" exited with code 14.
    Error while building/deploying project AppV2 (kit: Android for armeabi-v7a (Clang Qt 5.12.1 for Android ARMv72))
    When executing step "Build Android APK"
    

    I removed «|mcc|mnc|density» from Manifest file, cleaned project, tried again but still same error. I am drying to build in debug mode. Also i choose Android-21 for both minimum and target SDK while using android-21 API.

    SDK version: 26.1.1
    NDK version: 18.1.5063045
    Qt version: 12.1

  • I updated NDK to latest but didn’t work.

    Then I changed SDK to 28 from 21, then It compiled. There should be a bug in lower version SDKs I guess.

  • @maydin

    I am using with Qt5.12.1 these versions
    0_1552555954574_e867802d-8ce5-4571-925f-6dbb2721dcd9-image.png
    Therefore I recommend to upgrade the ndk version

  • Can you post your manifest here? Or at least line 39 and line containing configChanges?

  • @sierdzio said in Not possible to deploy for Android:

    Can you post your manifest here? Or at least line 39 and line containing configChanges?

    • Cleaned project
    • Deleted android folder in project
    • Removed related lines from .PRO
    • Deleted build folder
    • Project Settings -> Create template -> Chosen API 21 for both minimum and target.
    <activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="AppV2" android:screenOrientation="unspecified" android:launchMode="singleTop">
    

    Same error. Then I deleted build folder again and changed only configchanges to this:

    <?xml version="1.0"?>
    <manifest package="org.qtproject.example.appv2" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1" android:versionCode="1" android:installLocation="auto">
        <application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="AppV2">
            <activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="AppV2" android:screenOrientation="unspecified" android:launchMode="singleTop">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN"/>
                    <category android:name="android.intent.category.LAUNCHER"/>
                </intent-filter>
    
                <!-- Application arguments -->
                <!-- meta-data android:name="android.app.arguments" android:value="arg1 arg2 arg3"/ -->
                <!-- Application arguments -->
    
                <meta-data android:name="android.app.lib_name" android:value="AppV2"/>
                <meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
                <meta-data android:name="android.app.repository" android:value="default"/>
                <meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/>
                <meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/>
                <!-- Deploy Qt libs as part of package -->
                <meta-data android:name="android.app.bundle_local_qt_libs" android:value="-- %%BUNDLE_LOCAL_QT_LIBS%% --"/>
                <meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/>
                <meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/>
                <!-- Run with local libs -->
                <meta-data android:name="android.app.use_local_qt_libs" android:value="-- %%USE_LOCAL_QT_LIBS%% --"/>
                <meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
                <meta-data android:name="android.app.load_local_libs" android:value="-- %%INSERT_LOCAL_LIBS%% --"/>
                <meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/>
                <meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/>
                <!-- Used to specify custom system library path to run with local system libs -->
                <!-- <meta-data android:name="android.app.system_libs_prefix" android:value="/system/lib/"/> -->
                <!--  Messages maps -->
                <meta-data android:value="@string/ministro_not_found_msg" android:name="android.app.ministro_not_found_msg"/>
                <meta-data android:value="@string/ministro_needed_msg" android:name="android.app.ministro_needed_msg"/>
                <meta-data android:value="@string/fatal_error_msg" android:name="android.app.fatal_error_msg"/>
                <!--  Messages maps -->
    
                <!-- Splash screen -->
                <!-- meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/ -->
                <!-- meta-data android:name="android.app.splash_screen_sticky" android:value="true"/ -->
                <!-- Splash screen -->
    
                <!-- Background running -->
                <!-- Warning: changing this value to true may cause unexpected crashes if the
                              application still try to draw after
                              "applicationStateChanged(Qt::ApplicationSuspended)"
                              signal is sent! -->
                <meta-data android:name="android.app.background_running" android:value="false"/>
                <!-- Background running -->
    
                <!-- auto screen scale factor -->
                <meta-data android:name="android.app.auto_screen_scale_factor" android:value="false"/>
                <!-- auto screen scale factor -->
    
                <!-- extract android style -->
                <!-- available android:values :
                    * default - In most cases this will be the same as "full", but it can also be something else if needed, e.g., for compatibility reasons
                    * full - useful QWidget & Quick Controls 1 apps
                    * minimal - useful for Quick Controls 2 apps, it is much faster than "full"
                    * none - useful for apps that don't use any of the above Qt modules
                    -->
                <meta-data android:name="android.app.extract_android_style" android:value="default"/>
                <!-- extract android style -->
        </activity>
    
        <!-- For adding service(s) please check: https://wiki.qt.io/AndroidServices -->
    
        </application>
    
        <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="21"/>
        <supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
    
        <!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
             Remove the comment if you do not require these default permissions. -->
        <!-- %%INSERT_PERMISSIONS -->
    
        <!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
             Remove the comment if you do not require these default features. -->
        <!-- %%INSERT_FEATURES -->
    
    </manifest>
    

    Now build works. But it doesn’t start in my phone now. Here application output:

    D/SecurityLogAgent(10563): FileCipher : Destination file name = denialLog-565317820.zip dest file Size 1360
    E/Zygote  ( 6531): MountEmulatedStorage()
    E/Zygote  ( 6531): v2
    I/SELinux ( 6531): Function: selinux_compare_spd_ram, SPD-policy is existed. and_ver=SEPF_GT-I9500_5.0.1-1 ver=51
    I/libpersona( 6531): KNOX_SDCARD checking this for 10059
    I/libpersona( 6531): KNOX_SDCARD not a persona
    I/SELinux ( 6531): Function: selinux_compare_spd_ram , priority [1] , priority version is VE=SEPF_GT-I9500_5.0.1-1_0051
    E/SELinux ( 6531): [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
    I/art     ( 6531): Late-enabling -Xcheck:jni
    I/ActivityManager( 3283): Start proc org.qtproject.example.appv2 for activity org.qtproject.example.appv2/org.qtproject.qt5.android.bindings.QtActivity: pid=6531 uid=10059 gids={50059, 9997, 3003, 1028, 1015, 1023} abi=armeabi-v7a
    D/ResourcesManager( 6531): creating new AssetManager and set to /data/app/org.qtproject.example.appv2-2/base.apk
    V/BitmapFactory( 6531): DecodeImagePath(decodeResourceStream3) : res/drawable-xxhdpi-v4/ic_ab_back_holo_light_am.png
    V/BitmapFactory( 6531): DecodeImagePath(decodeResourceStream3) : res/drawable-xxhdpi-v4/sym_def_app_icon.png
    I/QtCore  ( 6531): Start
    I/Qt      ( 6531): qt started
    V/BitmapFactory( 6531): DecodeImagePath(decodeResourceStream3) : res/drawable-xxhdpi-v4/scrubber_control_disabled_holo.png
    V/BitmapFactory( 6531): DecodeImagePath(decodeResourceStream3) : res/drawable-xxhdpi-v4/scrubber_control_pressed_holo.png
    V/BitmapFactory( 6531): DecodeImagePath(decodeResourceStream3) : res/drawable-xxhdpi-v4/scrubber_control_focused_holo.png
    V/BitmapFactory( 6531): DecodeImagePath(decodeResourceStream3) : res/drawable-xxhdpi-v4/scrubber_control_normal_holo.png
    V/BitmapFactory( 6531): DecodeImagePath(decodeResourceStream3) : res/drawable-xxhdpi-v4/text_select_handle_middle.png
    V/BitmapFactory( 6531): DecodeImagePath(decodeResourceStream3) : res/drawable-xhdpi-v4/btn_check_buttonless_on.png
    V/BitmapFactory( 6531): DecodeImagePath(decodeResourceStream3) : res/drawable-xhdpi-v4/btn_check_buttonless_off.png
    D/Activity( 6531): performCreate Call secproduct feature valuefalse
    D/Activity( 6531): performCreate Call debug elastic valuetrue
    D/OpenGLRenderer( 6531): Render dirty regions requested: true
    D/Atlas   ( 6531): Validating map...
    I/OpenGLRenderer( 6531): Initialized EGL, version 1.4
    W/OpenGLRenderer( 6531): Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
    D/OpenGLRenderer( 6531): Get maximum texture size. GL_MAX_TEXTURE_SIZE is 4096
    D/OpenGLRenderer( 6531): Enabling debug mode 0
    E/        ( 6531): [android_ws] Format: 5, Width: 1080, Height: 1920
    E/        ( 6531): [android_ws] Format: 5, Width: 1080, Height: 1920
    E/        ( 6531): [android_ws] Format: 5, Width: 1080, Height: 1920
    E/        ( 6531): [android_ws] Format: 5, Width: 1080, Height: 1920
    W/System.err( 6531): java.lang.Exception: Can't find main library 'AppV2'
    W/System.err( 6531): 	at org.qtproject.qt5.android.QtNative.startApplication(QtNative.java:331)
    W/System.err( 6531): 	at org.qtproject.qt5.android.QtActivityDelegate$4.run(QtActivityDelegate.java:730)
    W/System.err( 6531): 	at org.qtproject.qt5.android.QtLayout.onSizeChanged(QtLayout.java:77)
    W/System.err( 6531): 	at android.view.View.sizeChange(View.java:16803)
    W/System.err( 6531): 	at android.view.View.setFrame(View.java:16776)
    W/System.err( 6531): 	at android.view.View.layout(View.java:16691)
    W/System.err( 6531): 	at android.view.ViewGroup.layout(ViewGroup.java:5328)
    W/System.err( 6531): 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
    W/System.err( 6531): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
    W/System.err( 6531): 	at android.view.View.layout(View.java:16695)
    W/System.err( 6531): 	at android.view.ViewGroup.layout(ViewGroup.java:5328)
    W/System.err( 6531): 	at com.android.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:494)
    W/System.err( 6531): 	at android.view.View.layout(View.java:16695)
    W/System.err( 6531): 	at android.view.ViewGroup.layout(ViewGroup.java:5328)
    W/System.err( 6531): 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
    W/System.err( 6531): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
    W/System.err( 6531): 	at android.view.View.layout(View.java:16695)
    W/System.err( 6531): 	at android.view.ViewGroup.layout(ViewGroup.java:5328)
    W/System.err( 6531): 	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2319)
    W/System.err( 6531): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2032)
    W/System.err( 6531): 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1191)
    W/System.err( 6531): 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6642)
    W/System.err( 6531): 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:777)
    W/System.err( 6531): 	at android.view.Choreographer.doCallbacks(Choreographer.java:590)
    W/System.err( 6531): 	at android.view.Choreographer.doFrame(Choreographer.java:560)
    W/System.err( 6531): 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763)
    W/System.err( 6531): 	at android.os.Handler.handleCallback(Handler.java:739)
    W/System.err( 6531): 	at android.os.Handler.dispatchMessage(Handler.java:95)
    W/System.err( 6531): 	at android.os.Looper.loop(Looper.java:145)
    W/System.err( 6531): 	at android.app.ActivityThread.main(ActivityThread.java:5951)
    W/System.err( 6531): 	at java.lang.reflect.Method.invoke(Native Method)
    W/System.err( 6531): 	at java.lang.reflect.Method.invoke(Method.java:372)
    W/System.err( 6531): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
    W/System.err( 6531): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
    W/InputMethodManagerService( 3283): Focus gain on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@3440e7c4 (uid=10059 pid=6531)
    I/ActivityManager( 3283): Killing 6531:org.qtproject.example.appv2/u0a59 (adj 15): empty #31
    
    
    "org.qtproject.example.appv2" died.
    
  • Hm, manifest looks okay. At runtime your main activity is not found, which might mean some missing app template code perhaps (I’m not sure, I haven’t seen this error before). But androiddeployqt provides a default template if one is missing in the app code. So, I don’t know, sorry.

  • @sierdzio said in Not possible to deploy for Android:

    Hm, manifest looks okay. At runtime your main activity is not found, which might mean some missing app template code perhaps (I’m not sure, I haven’t seen this error before). But androiddeployqt provides a default template if one is missing in the app code. So, I don’t know, sorry.

    Well I will try with newer NDK version then.

    But I have a question. I used android-21 here but i dont know should I use android-28 and choose both target and minimum to 21 again.

    And which version should I select at «target sdk». I dont get the purpose of that.

  • If you are compiling for ARM64, you should definitely use target API 28.

    A very general hint:

    • target API — always use newest
    • minimal API — check which oldest Android version is still quite popular (~10% market share) and choose the corresponding API

    I dont get the purpose of that.

    Read Android documentation, then.

  • Always run gradlew lint (or gradlew.bat lint on Windows) command in the build directory after any Android-related changes and look into HTML report file produced by this tool. It warns about many potential issues and inconsistencies (manifest issues, API version mismatches, invalid and unused resources, localization issues, general programming errors in your Android-related Java code, obsolete dependencies, and so on, and so on). Very useful.

  • I updated NDK to latest but didn’t work.

    Then I changed SDK to 28 from 21, then It compiled. There should be a bug in lower version SDKs I guess.

  • Понравилась статья? Поделить с друзьями:
  • Error failed login to maxon account failed and no offline license found
  • Error failed building wheel for pocketsphinx
  • Error failed building wheel for pillow
  • Error failed building wheel for pandas
  • Error failed building wheel for numpy failed to build numpy