Open UzverNumber47 opened 7 months ago
error: cannot find symbol com.applovin.sdk.AppLovinGender
Is also affected.
However other sdk imports below are fine
import com.applovin.sdk.AppLovinMediationProvider; import com.applovin.sdk.AppLovinPrivacySettings; import com.applovin.sdk.AppLovinSdk; import com.applovin.sdk.AppLovinSdkConfiguration; import com.applovin.sdk.AppLovinSdkSettings; import com.applovin.sdk.AppLovinSdkUtils;
Yes, the new Android SDK release is the issue.
The quick workaround will be replacing
com.applovin:applovin-sdk:+
with
com.applovin:applovin-sdk:12.3.1
Thanks for reporting this issue. This is due to Cordova plugin automatically pulling in our latest iOS/Android native SDKs. We'll have a fix out sometime today.
@thomasmso
I sent a pull request I hope you also update the plugin version in npm
Thank you sir
@EMI-INDO - Thanks for the PR, other priorities took precedence, I will check this out tomorrow.
Fixed it in v1.1.5: https://github.com/AppLovin/AppLovin-MAX-Cordova/releases/tag/release_1_1_5.
Yes in the near future I will update the Android and iOS code which will work on the latest SDK.
Problem up again , it somehow connected to [13.0.1] SDK release? How Build now?
The latest version of our Cordova Plugin depends on v12.3.1 native SDKs (https://github.com/AppLovin/AppLovin-MAX-Cordova/releases). Thus, you need to ensure that your Podfiles and build.gradle files hardcode to version 12.3.1.
You can see that is what we did in our plugin.xml
file:
https://github.com/AppLovin/AppLovin-MAX-Cordova/blob/master/plugin/plugin.xml#L26
Did something potentially change recently? I am seeing this problem arise even though previously I have had the 12.3.1 work (inside 1.1.5).
iOS build works fine. Android build fails.
This is the output log:
> Task :app:compileDebugJavaWithJavac
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:29: error: cannot find symbol
import com.applovin.sdk.AppLovinAdContentRating;
^
symbol: class AppLovinAdContentRating
location: package com.applovin.sdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:30: error: cannot find symbol
import com.applovin.sdk.AppLovinGender;
^
symbol: class AppLovinGender
location: package com.applovin.sdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:1377: error: cannot find symbol
private static AppLovinGender integerToALGender(final Integer gender)
^
symbol: class AppLovinGender
location: class AppLovinMAX
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:1397: error: cannot find symbol
private static AppLovinAdContentRating integerToALAdContentRating(final Integer maximumAdContentRating)
^
symbol: class AppLovinAdContentRating
location: class AppLovinMAX
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:178: error: cannot find symbol
sdk.getTargetingData().setYearOfBirth( yearOfBirthToSet );
^
symbol: method getTargetingData()
location: variable sdk of type AppLovinSdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:184: error: cannot find symbol
sdk.getTargetingData().setGender( integerToALGender( genderToSet ) );
^
symbol: method getTargetingData()
location: variable sdk of type AppLovinSdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:190: error: cannot find symbol
sdk.getTargetingData().setMaximumAdContentRating( integerToALAdContentRating( maximumAdContentRatingToSet ) );
^
symbol: method getTargetingData()
location: variable sdk of type AppLovinSdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:196: error: cannot find symbol
sdk.getTargetingData().setEmail( emailToSet );
^
symbol: method getTargetingData()
location: variable sdk of type AppLovinSdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:202: error: cannot find symbol
sdk.getTargetingData().setPhoneNumber( phoneNumberToSet );
^
symbol: method getTargetingData()
location: variable sdk of type AppLovinSdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:208: error: cannot find symbol
sdk.getTargetingData().setKeywords( keywordsToSet );
^
symbol: method getTargetingData()
location: variable sdk of type AppLovinSdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:214: error: cannot find symbol
sdk.getTargetingData().setInterests( interestsToSet );
^
symbol: method getTargetingData()
location: variable sdk of type AppLovinSdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:247: error: cannot find symbol
message.put( "isAgeRestrictedUser", AppLovinPrivacySettings.isAgeRestrictedUser( context ) );
^
symbol: method isAgeRestrictedUser(Context)
location: class AppLovinPrivacySettings
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:302: error: cannot find symbol
AppLovinPrivacySettings.setIsAgeRestrictedUser( isAgeRestrictedUser, getCurrentActivity() );
^
symbol: method setIsAgeRestrictedUser(boolean,Activity)
location: class AppLovinPrivacySettings
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:308: error: cannot find symbol
PluginResult result = new PluginResult( OK, AppLovinPrivacySettings.isAgeRestrictedUser( getCurrentActivity() ) );
^
symbol: method isAgeRestrictedUser(Activity)
location: class AppLovinPrivacySettings
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:388: error: cannot find symbol
sdk.getTargetingData().setYearOfBirth( yearOfBirth );
^
symbol: method getTargetingData()
location: variable sdk of type AppLovinSdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:433: error: cannot find symbol
sdk.getTargetingData().setEmail( email );
^
symbol: method getTargetingData()
location: variable sdk of type AppLovinSdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:448: error: cannot find symbol
sdk.getTargetingData().setPhoneNumber( phoneNumber );
^
symbol: method getTargetingData()
location: variable sdk of type AppLovinSdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:463: error: cannot find symbol
sdk.getTargetingData().setKeywords( keywords );
^
symbol: method getTargetingData()
location: variable sdk of type AppLovinSdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:478: error: cannot find symbol
sdk.getTargetingData().setInterests( interests );
^
symbol: method getTargetingData()
location: variable sdk of type AppLovinSdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:497: error: cannot find symbol
sdk.getTargetingData().clearAll();
^
symbol: method getTargetingData()
location: variable sdk of type AppLovinSdk
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:842: error: method does not override or implement a method from a supertype
@Override
^
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:848: error: method does not override or implement a method from a supertype
@Override
^
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:1381: error: cannot find symbol
return AppLovinGender.FEMALE;
^
symbol: variable AppLovinGender
location: class AppLovinMAX
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:1385: error: cannot find symbol
return AppLovinGender.MALE;
^
symbol: variable AppLovinGender
location: class AppLovinMAX
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:1389: error: cannot find symbol
return AppLovinGender.OTHER;
^
symbol: variable AppLovinGender
location: class AppLovinMAX
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:1393: error: cannot find symbol
return AppLovinGender.UNKNOWN;
^
symbol: variable AppLovinGender
location: class AppLovinMAX
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:1401: error: cannot find symbol
return AppLovinAdContentRating.ALL_AUDIENCES;
^
symbol: variable AppLovinAdContentRating
location: class AppLovinMAX
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:1405: error: cannot find symbol
return AppLovinAdContentRating.EVERYONE_OVER_TWELVE;
^
symbol: variable AppLovinAdContentRating
location: class AppLovinMAX
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:1409: error: cannot find symbol
return AppLovinAdContentRating.MATURE_AUDIENCES;
^
symbol: variable AppLovinAdContentRating
location: class AppLovinMAX
/cordova/platforms/android/app/src/main/java/com/applovin/cordova/AppLovinMAX.java:1413: error: cannot find symbol
return AppLovinAdContentRating.NONE;
^
symbol: variable AppLovinAdContentRating
location: class AppLovinMAX
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
30 errors
> Task :app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
@kreso22 - looks like you are bundling the latest version of our Android SDK v13.0.0 which do not have those APIs anymore. Our latest Cordova plugin supports up to native Android and iOS SDKs v12.3.1: https://github.com/AppLovin/AppLovin-MAX-Cordova/releases.
@kreso22 - looks like you are bundling the latest version of our Android SDK v13.0.0 which do not have those APIs anymore. Our latest Cordova plugin supports up to native Android and iOS SDKs v12.3.1: https://github.com/AppLovin/AppLovin-MAX-Cordova/releases.
I'm not trying to 'do' anything. I am using latest 1.1.5 (with 12.3.1), and have been using it. iOS works.
I can't trace where the problem is coming from.
I run tools/gradlew :app:dependencies --configuration implementation
the only potential clue I can see is that automatic version is being used by google-adapter and unityads-adapter
Should I maybe change those to some specific older version?
dependencies {
implementation 'com.applovin:applovin-sdk:12.3.1'
implementation 'com.applovin.mediation:google-adapter:+'
implementation 'com.applovin.mediation:unityads-adapter:+'
}
For Google, can you hardcode to version 23.3.0.0, and for UnityAds can you hardcode to 4.12.2.0?
For Google, can you hardcode to version 23.3.0.0, and for UnityAds can you hardcode to 4.12.2.0?
Yes! That worked. Thanks a bunch for your help!
MAX Plugin Version
1.1.4
Cordova Version
12.0.1
Device/Platform Info
Android 12
Current Behavior
error: cannot find symbol import com.applovin.sdk.AppLovinAdContentRating
Expected Behavior
Should compile
How to Reproduce
Simply add a plugin
cordova plugin add cordova-plugin-applovin-max
Additional Info
This is probably somehow connected with the latest release of applovin
Could please suggest a quick workaround?