Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   Android Manifest problems (https://www.delphipraxis.net/197518-android-manifest-problems.html)

direktor 13. Aug 2018 09:50

Android Manifest problems
 
Using Delphi XE8 I get errors all the time when compiling a project:

1. [CreateAndroidManifestFile Warning] android:hardwareAccelerated attribute not found. Please review AndroidManifest.template.xml
2. [PAClient Error] Error: E2312 Unable to execute '"C:\Users\Public\Documents\Embarcadero\Studio\16. 0\PlatformSDKs\android-sdk-windows\build-tools\21.1.2\Aapt.exe" package -f -M "D:\myprograms\NEW\Delphi\Test\Android\Debug\Click ed\AndroidManifest.xml" -F "D:\myprograms\NEW\Delphi\Test\Android\Debug\Click ed\bin\Clicked-unsigned.apk" -I "C:\Users\Public\Documents\Embarcadero\Studio\16.0 \PlatformSDKs\android-sdk-windows\platforms\android-21\android.jar" -S "D:\myprograms\NEW\Delphi\Test\Android\Debug\Click ed\res" -A "D:\myprograms\NEW\Delphi\Test\Android\Debug\Click ed\assets" "D:\myprograms\NEW\Delphi\Test\Android\Debug\Click ed\library" "D:\myprograms\NEW\Delphi\Test\Android\Debug\Click ed\classes"' (Error 1)

[PAClient Error] Error: E2312 D:\myprograms\NEW\Delphi\Test\Android\Debug\Clicke d\AndroidManifest.xml:1: error: Error parsing XML: not well-formed (invalid token)

How to solve the problems with this Manifest XML? I didn't input Api keys and all other keys at testing stage. What needs to be done to get rid of this Manifest problems?

Thanks for help.

knaeuel 5. Sep 2018 12:26

AW: Android Manifest problems
 
you should perhaps start a new project with a new AndroidManifest.template.xml

the missing line is this
Code:
        android:hardwareAccelerated="%hardwareAccelerated%">
and this is the complete template file (in Delphi 10.2.3)

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- BEGIN_INCLUDE(manifest) -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="%package%"
        android:versionCode="%versionCode%"
        android:versionName="%versionName%"
        android:installLocation="%installLocation%">

    <!-- This is the platform API where NativeActivity was introduced. -->
    <uses-sdk android:minSdkVersion="%minSdkVersion%" android:targetSdkVersion="%targetSdkVersion%" />
<%uses-permission%>
    <uses-feature android:glEsVersion="0x00020000" android:required="True"/>
    <application android:persistent="%persistent%"
        android:restoreAnyVersion="%restoreAnyVersion%"
        android:label="%label%"
        android:debuggable="%debuggable%"
        android:largeHeap="%largeHeap%"
        android:icon="%icon%"
        android:theme="%theme%"
        android:hardwareAccelerated="%hardwareAccelerated%">
        <!-- Our activity is a subclass of the built-in NativeActivity framework class.
             This will take care of integrating with our NDK code. -->
        <activity android:name="com.embarcadero.firemonkey.FMXNativeActivity"
                  android:label="%activityLabel%"
                  android:configChanges="orientation|keyboard|keyboardHidden|screenSize">
            <!-- Tell NativeActivity the name of our .so -->
            <meta-data android:name="android.app.lib_name"
                android:value="%libNameValue%" />
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <%activity%>
        <%receivers%>
    </application>
</manifest>  
<!-- END_INCLUDE(manifest) -->
hopefully, this fixes all problems


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:47 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz