AppsFlyerSDK / appsflyer-cordova-plugin

AppsFlyer plugin for Cordova
MIT License
37 stars 71 forks source link

Can't build using cordova-android@10.1.1 #198

Open CrackHub opened 2 years ago

CrackHub commented 2 years ago

Report

Plugin Version

6.5.2

On what Platform are you having the issue?

android

What did you do?

Run cordova prepare Run cordova build android

What did you expect to happen?

Build succesfull

What happened instead?

BU¦LD SUCCESSFUL in 872ms
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app

> Task :CordovaLib:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :app:compileDebugJavaWithJavac FAILED
Z:\MyGame\platforms\android\app\src\main\java\com\appsflyer\cordova\plugin\AppsFlyerPlugin.java:44: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
Z:\MyGame\platforms\android\app\src\main\java\com\appsflyer\cordova\plugin\AppsFlyerPlugin.java:1117: error: cannot find symbol
    private String[] stringToArray(@NonNull String str) {
                                    ^
  symbol:   class NonNull
  location: class com.appsflyer.cordova.plugin.AppsFlyerPlugin
Z:\MyGame\platforms\android\app\src\main\java\com\appsflyer\cordova\plugin\AppsFlyerPlugin.java:1136: error: cannot find symbol
    private String[] jsonArrayToStringArray(@NonNull JSONArray json) throws JSONException {
                                             ^
  symbol:   class NonNull
  location: class com.appsflyer.cordova.plugin.AppsFlyerPlugin
Z:\MyGame\platforms\android\app\src\main\java\com\appsflyer\cordova\plugin\AppsFlyerPlugin.java:316: error: cannot find symbol
            public void onDeepLinking(@NonNull DeepLinkResult deepLinkResult) {
                                       ^
  symbol: class NonNull
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Z:\MyGame\platforms\android\app\src\main\java\org\apache\cordova\file\AssetFilesystem.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BU¦LD FAILED in 6s
44 actionable tasks: 44 executed
Command failed with exit code 1: Z:\MyGame\platforms\android\gradlew cdvBuildDebug -b Z:\MyGame\platforms\android\build.gradle

Please provide any other relevant information.

Used plugins;

Android project created with cordova-android@10.1.1
Plugin 'cordova-plugin-appsflyer-sdk' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-gameanalytics' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-device' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-inappbrowser' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-splashscreen' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-file' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-fullscreen' found in config.xml... Migrating it to package.json
pazlavi commented 2 years ago

Hi @CrackHub, Thank you for reaching out to us.

We still support the previous cordova-android versions, so we can't update the dependency to AndroidX yet. You can use the 3'rd party library cordova-plugin-androidx-adapter, and it will solve your issue.

CrackHub commented 2 years ago

Thanks, it is working now.