distriqt / ANE-AndroidSupport

Android Support Library Native Extension
https://airnativeextensions.com
22 stars 4 forks source link

Unable to build Android Build #15

Closed Shaunmax closed 2 years ago

Shaunmax commented 2 years ago

Hello @marchbold

I dont know if this is an issue with the ANES or with the latest AIR sdks? I am unable to build android build. I am getting the following error image image image

please let me know, if you know anything about it

marchbold commented 2 years ago

Looks like your JVM is running out of memory. Nothing to do with ANEs as far as I can see.

Is this in intellij? Have a look here: https://github.com/airsdk/Adobe-Runtime-Support/discussions/1426#discussioncomment-1769453

davecates commented 2 years ago

I'm getting the same fault - on a new Mac with 64GB RAM so no chance of running out of resources :)

It's the API version being out of date with the latest Android build tools? ANE has 1.4 but tools are looking for 1.5?

Any ideas?

davecates commented 2 years ago

Here's my output:

java.io.IOException: Unable to run java: com.adobe.air.ADTException: gradle tool failed: w: Runtime JAR files in the classpath have the version 1.4, which is older than the API version 1.5. Consider using the runtime of version 1.5, or pass '-api-version 1.4' explicitly to restrict the available APIs to the runtime of version 1.4. You can also pass '-language-version 1.4' instead, which will restrict not only the APIs to the specified version, but also the language features
w: /private/var/folders/5z/p1tz8lvd09nb0ywgkwy7y1w80000gn/T/d74129ea-dc6d-4199-9a27-3696dafc6d15/app/libs/kotlin-stdlib-jdk7-1.4.10.jar: Runtime JAR file has version 1.4 which is older than required for API version 1.5
w: /private/var/folders/5z/p1tz8lvd09nb0ywgkwy7y1w80000gn/T/d74129ea-dc6d-4199-9a27-3696dafc6d15/app/libs/kotlin-stdlib-common-1.4.10.jar: Runtime JAR file has version 1.4 which is older than required for API version 1.5
w: /private/var/folders/5z/p1tz8lvd09nb0ywgkwy7y1w80000gn/T/d74129ea-dc6d-4199-9a27-3696dafc6d15/app/libs/kotlin-stdlib-1.4.10.jar: Runtime JAR file has version 1.4 which is older than required for API version 1.5
w: Runtime JAR files in the classpath have the version 1.4, which is older than the API version 1.5. Consider using the runtime of version 1.5, or pass '-api-version 1.4' explicitly to restrict the available APIs to the runtime of version 1.4. You can also pass '-language-version 1.4' instead, which will restrict not only the APIs to the specified version, but also the language features
w: /private/var/folders/5z/p1tz8lvd09nb0ywgkwy7y1w80000gn/T/d74129ea-dc6d-4199-9a27-3696dafc6d15/app/libs/kotlin-stdlib-jdk7-1.4.10.jar: Runtime JAR file has version 1.4 which is older than required for API version 1.5
w: /private/var/folders/5z/p1tz8lvd09nb0ywgkwy7y1w80000gn/T/d74129ea-dc6d-4199-9a27-3696dafc6d15/app/libs/kotlin-stdlib-common-1.4.10.jar: Runtime JAR file has version 1.4 which is older than required for API version 1.5
w: /private/var/folders/5z/p1tz8lvd09nb0ywgkwy7y1w80000gn/T/d74129ea-dc6d-4199-9a27-3696dafc6d15/app/libs/kotlin-stdlib-1.4.10.jar: Runtime JAR file has version 1.4 which is older than required for API version 1.5
/private/var/folders/5z/p1tz8lvd09nb0ywgkwy7y1w80000gn/T/d74129ea-dc6d-4199-9a27-3696dafc6d15/app/src/main/AndroidManifest.xml:139: Error: HmsMessageServiceOneSignal must extend android.app.Service [Instantiatable]
android:name="com.onesignal.HmsMessageServiceOneSignal"
Shaunmax commented 2 years ago

I'm getting the same fault - on a new Mac with 64GB RAM so no chance of running out of resources :)

It's the API version being out of date with the latest Android build tools? ANE has 1.4 but tools are looking for 1.5?

Any ideas?

try increasing compiler heap size image

Error: HmsMessageServiceOneSignal must extend android.app.Service [Instantiatable] android:name="com.onesignal.HmsMessageServiceOneSignal"

remove the below block from manifest xml :


<service
            android:name="com.onesignal.HmsMessageServiceOneSignal"
            android:exported="false" >
            <intent-filter>
                <action android:name="com.huawei.push.action.MESSAGING_EVENT" />
            </intent-filter>
        </service>

        <activity
            android:name="com.onesignal.NotificationOpenedActivityHMS"
            android:noHistory="true"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
            </intent-filter>
        </activity>
Shaunmax commented 2 years ago

For more information please follow this link https://github.com/airsdk/Adobe-Runtime-Support/discussions/1426#discussioncomment-1818032

Duplicate of #1426

davecates commented 2 years ago

This doesn't fix the issue for me.

marchbold commented 2 years ago

@davecates Did you remove the Huawei service? HmsMessageServiceOneSignal

That looks like the error you are seeing in that log.

davecates commented 2 years ago

Yes, sure did. Still getting the 1.4 vs 1.5 error though...will investigate further but thought I'd let you know.

marchbold commented 2 years ago

That one isn't an error, just a warning and is safe to ignore. There will be an error after the warnings.