0

I got warnings when I upload cn1 Android build to Google Play.

The warning messages are below.

enter image description here

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
     implementation 'androidx.appcompat:appcompat:1.0.0'
 compile 'com.google.android.gms:play-services-auth:12.0.1'
 compile 'com.google.android.gms:play-services-base:12.0.1'
 compile 'com.google.android.gms:play-services-analytics:12.0.1'
 compile 'com.google.android.gms:play-services-gcm:12.0.1'
 compile 'com.google.android.gms:play-services-location:12.0.1'
 compile 'com.google.android.gms:play-services-maps:12.0.1'
 compile 'com.google.android.gms:play-services-ads:12.0.1'
 implementation 'com.android.billingclient:billing:4.0.0'
 implementation 'androidx.multidex:multidex:1.0.3'
implementation 'co.infinum:goldeneye:1.1.2';
}
Daniel Tsai
  • 729
  • 4
  • 10
  • Which ad library dependencies are you using in Maven? Are you using the full screen ads or something else? – Shai Almog Feb 04 '23 at 06:25
  • I don't have any ads in my app. I don't use Maven. I check the build hints of my app but without any key related to ads. How do I check the ad library dependencies? – Daniel Tsai Feb 05 '23 at 01:20
  • Can you add your build hints from the properties file? Only the android.* related ones. – Shai Almog Feb 05 '23 at 05:46
  • I attached the keys related to android.* as an image in question. – Daniel Tsai Feb 05 '23 at 13:17
  • I'll need the values too for those that accept something other than numbers or boolean values. You can copy and paste them from the codenameone_settings.properties file. – Shai Almog Feb 06 '23 at 02:59
  • Also this might be related to an older version you had on play that did include those issues but is in the beta or alpha channel. Even if it's closed or "deleted" Google might still reject new releases because of that nonsense and is very unclear about that. See: https://stackoverflow.com/a/68931495/756809 – Shai Almog Feb 06 '23 at 03:01
  • I sent the codenameone_settings.properties through cn1 chat. This issue happens since last month but I don't change any settings since then. – Daniel Tsai Feb 06 '23 at 03:19
  • I looked through it and didn't see something immediately wrong. I've asked Steve to check. – Shai Almog Feb 07 '23 at 02:54
  • Steve replied to me. He said it would be an older version issue. But my app doesn't have any build hint about ads in any release. – Daniel Tsai Feb 08 '23 at 00:50
  • I saw a flurry build hint. I didn't see anything related to the android version but there's some iOS stuff there. But I agree with Steve I couldn't find anything that would make sense there. You never uploaded a beta or alpha version of your app in the past? – Shai Almog Feb 08 '23 at 02:53
  • Yes, I have beta and alpha versions of my app in the past. What can I do now? Should I publish a new release to all the alpha and beta channels? – Daniel Tsai Feb 08 '23 at 13:03
  • I try to upload a new release of my app to internal testing. It also produces the issue. Pls. see the attached image in the question. – Daniel Tsai Feb 08 '23 at 13:35
  • If you unzip the apk file and look within in the manifest xml file. Does it include mention of ads? What's listed there? – Shai Almog Feb 09 '23 at 03:11
  • I unzip the apk file but I can't find manifest.xml file. Only AndroidManifest.xml which is not pure text file in the main directory. MANIFEST.MF in a subdirectory META-INF. I can't find any keywords related to ads in both of the files. Which file is the one you mention? – Daniel Tsai Feb 09 '23 at 03:24
  • Yes that's the file I meant. It doesn't seem to include any ad dependency which strengthens the theory that this is some garbage in the beta track or some other weird google play oddity. – Shai Almog Feb 10 '23 at 03:40
  • This app doesn't include any ads in any version, but there is another app that includes ads features that are unpublished. Do you think this is a problem? I don't know how to do. Would you describe more clearly the solution in your reference doc "The solution is to go one by one to the internal, alpha, beta channels and promote a release then finally publish to production." – Daniel Tsai Feb 10 '23 at 15:06
  • I saw that this specific app had flurry in the past since it's still there in iOS. So I'm guessing an older version had it and is still somewhere in the alpha channel. I wrote about this a bit more [here](https://dev.to/codenameone/google-play-kafkaesque-experience-mp3). You need to upload a new alpha version of the app. Then promote it to beta. Then promote that to production. This purges the content of all the channels. – Shai Almog Feb 11 '23 at 05:41
  • Do you mean the processes below? Internal testing->Closed testing->Open testing->Production? – Daniel Tsai Feb 11 '23 at 07:31
  • It doesn't work for me. After promoting all the channel, I still get the warning. The developer of Google Mobile Ads (GMA) SDK (com.google.android.gms:play-services-ads) has reported version 12.0.1 as outdated. Consider upgrading to one of the following versions before publishing a new release: 19.2.0+. Would you update GMA SDK to 19.2.0+ in your side(cn1 server)? – Daniel Tsai Feb 11 '23 at 08:22
  • Can you send a build with include source and check the Android source code returned? It shouldn't have any mention of ads within it. If it does then where would that be? – Shai Almog Feb 12 '23 at 02:54
  • How do I check the mention of ads? Would you provide some keywords for checking the mention of ads? – Daniel Tsai Feb 12 '23 at 03:30
  • Just search for the word ads in the project in any file. It should be pretty obvious if it's there since this is the project that generates the binary. – Shai Almog Feb 13 '23 at 03:10
  • Yes, I find the word ads in a section in build.gradle. I attach the section to the question. – Daniel Tsai Feb 13 '23 at 11:06
  • Yes, I find the word ads in a section in build.gradle. I attach the section to the question. compile 'com.google.android.gms:play-services-ads:12.0.1' – Daniel Tsai Feb 13 '23 at 11:14
  • There are also some files containing 'ads'. Ads.java, Form.java...... – Daniel Tsai Feb 13 '23 at 11:18
  • That doesn't matter. What seems to be the problem is the `build.gradle` entry. We'll look into it. – Shai Almog Feb 14 '23 at 03:00
  • Try setting `android.includeGPlayServices=false` to disable the default google play entries. Notice it might impact other requirements which you will need to add individually. Which libraries/features do you use? – Shai Almog Feb 14 '23 at 03:22
  • I don't know what libraries/features I use. How do I check it? Would you revise it in cn1 build server? I think you have to check the SDK version on your side. – Daniel Tsai Feb 14 '23 at 08:09
  • You can explicitly set the version with a build hint. But did you just try disabling as I mentioned? Do you use push? Location? Or anything like that in your app? – Shai Almog Feb 15 '23 at 03:06
  • I don't use either push or location. I don't use special features. I got no warnings after setting android.includeGPlayServices=false. Will this impact the payment feature? I have features about com.codename1.payment.*. – Daniel Tsai Feb 15 '23 at 08:25
  • You would need to add the build hint `android.playService.base=true` and `android.playService.auth=true`. This might require adding a newer `android.playServicesVersion` as well. I'm checking to see what value would be correct there. – Shai Almog Feb 16 '23 at 04:14
  • Why is it seems so complicated? Am I the only one who has this issue? My app doesn't have special features. Why should I have to add or modify these build hints? Would you prepare these build hints as default in cn1? – Daniel Tsai Feb 16 '23 at 14:36
  • I think the warning is new and most people don't look at warnings. You also hit the default legacy behavior of including multiple play libraries you don't need which was meant to ease migration. If you explicitly add the libraries you need that should solve the issue. You can set `android.playServiceVersion=16.0.0` to solve the issue. – Shai Almog Feb 17 '23 at 03:55
  • Should I add all three build hints below: android.playService.base=true android.playService.auth=true android.playServiceVersion=16.0.0 – Daniel Tsai Feb 17 '23 at 15:07
  • Yes. Those should solve the problem. – Shai Almog Feb 18 '23 at 05:10
  • Yes, those solve the problem. Thank you. – Daniel Tsai Feb 21 '23 at 05:13
  • I got errors from cn1 build server error log today. I added the four required build hints. android.includeGPlayServices=false android.playService.base=true android.playService.auth=true android.playServiceVersion=16.0.0 Errors Cause 3: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.google.android.gms:play-services-base:16.0.0. Required by: project : > com.google.android.gms:play-services-auth:16.0.0 > project : > com.google.android.gms:play-services-auth:16.0.0 > com.google.android.gms:play-services-auth-api-phone:15.0.1 – Daniel Tsai Feb 26 '23 at 14:58
  • Try removing the playServiceVersion, next week we hope this will be finally resolved, see [this](https://www.reddit.com/r/cn1/comments/11cmkp9/changes_to_android_play_services_versions/). – Shai Almog Feb 27 '23 at 02:49
  • Have you resolved this issue? – Daniel Tsai Mar 07 '23 at 08:05
  • We pushed a fix last week but reverted it after it caused some builds to fail. We will probably have to bite the bullet and make those builds fail at some point. – Shai Almog Mar 08 '23 at 02:41
  • Sorry, I don't quite understand. Will the issue be solved in these weeks? Thank you. – Daniel Tsai Mar 08 '23 at 13:22
  • Yes. We fixed it already in the code as you can see [in our git](https://github.com/codenameone/CodenameOne/commit/b723c9edcaf42699db60326f9ae90a151bdba152). You can also follow Steve's discussion on the related complexities [here](https://www.reddit.com/r/cn1/comments/11cmkp9/changes_to_android_play_services_versions/) – Shai Almog Mar 09 '23 at 02:54
  • Should I add back the 4 build hints for building? android.includeGPlayServices=false android.playService.base=true android.playService.auth=true android.playServiceVersion=16.0.0 – Daniel Tsai Mar 09 '23 at 03:59
  • This is just a warning so you don't need to be concerned about it. It will get fixed before it becomes an error. I would only include `android.playService.base=true` and `android.playService.auth=true` which are hints you would need anyway. – Shai Almog Mar 10 '23 at 04:37

2 Answers2

0

Try to update versions of the implemented dependencies in the Gradle of the project. Eg change

compile 'com.google.android.gms:play-services-auth:12.0.1'

To

implementation 'com.google.android.gms:play-services-auth:20.3.0'

Eric
  • 174
  • 1
  • 8
0

Android builds can be troublesome at times due to Gradle versions used and sometimes all it takes is to uses latest Gradle versions as shown in threads below

Updating Gradle & classpath versions

https://www.reddit.com/r/cn1/comments/xy1ep8/android_build_with_android_archive_aar_library/

Building successfully using latest Gradle dependencies

https://www.reddit.com/r/cn1/comments/xilgeh/failed_to_send_push_notification/

Eric
  • 174
  • 1
  • 8