Unsupported Version of Play billing - javascript

i am using react-native-billing library with version 3.0.0. I am facing an issue i.e, when we roll out the APK for production, after upload we are getting this error message :
"We've detected this app uses an unsupported version of Play billing. Please upgrade to Billing Library version 3 or newer to publish this app"
PROBLEM:-
I have manually added the following line in
android/app/build.gradle ->implementation project(':react-native-billing')
android/build.gradle -> minSdkVersion = 16,compileSdkVersion = 28,targetSdkVersion = 30
with these following details, the application is working fine but google refuses to upload our build with this error:-
"We've detected this app uses an unsupported version of Play billing. Please upgrade to Billing Library version 3 or newer to publish this app"
SOLUTION WE TRIED:-
added the following line in android/app/build.gradle
implementation "com.android.billingclient:billing:3.0.0"
using Android API 30
With these changes, the build was successfully uploaded but we are not getting a product list from "In-app products".
And after adding this line in debugging mode the application was crashing on this line.
InAppBilling.open();
We are importing InAppBilling from the "react-native-billing" library.
Any help will be highly appreciated.

Ran into the same issue - it looks like the plugin react-native-billing was built off of another plugin (https://github.com/anjlab/android-inapp-billing-v3) when Billing Library version 2 was the standard. Plugin android-inapp-billing-v3 has since updated to Billing Library 3 but react-native-billing has not implemented the required changes to match up. I've been able to force react-native-billing to pull the newer version of android-inapp-billing-v3 and am attempting to update the plugin manually (so far unsuccessfully) but if better heads want to give it a crack:
in
~\node_modules\react-native-billing\android\build.gradle
update:
dependencies {
...
implementation "com.anjlab.android.iab.v3:library:${safeExtGet('anjlabIABVersion', '2.0.3')}"
}
then follow this migration guide:
https://github.com/anjlab/android-inapp-billing-v3/blob/master/UPGRADING.md

Related

Is sdk going to be failure [duplicate]

After a successful import of an Eclipse-Android-Project into "Android Studio 1.4", I get the error
"Please select Android SDK"
when I click on the button to run the application in the simulator, I can't find any way of doing that.
This dialog opens when I click on "run":
This is the "project structure" dialog:
What should I do now?
I go to build.gradle and click sync now. Then it worked.
Update :
File -> Sync Project with Gradle Files (Android Studio 3.1.1)
Tools -> Android -> Sync Project with Gradle Files (Android Studio 3.0.1)
Or You can click on the icon from the toolbar.
This answer may not help works for later version as Android studio Team work on making the tool more better, the way to sync may be different in the next version of Android Studio.
COMMON WAY that may helps is try to sync project and then Invalidate Caches and Restart Android Studio.
Solution for Android Studio 3.1.2 [See below answer]
See Latest Android Studio version
FIX FOR 3.1.2 OR NEWER VERSIONS
Some of my colleagues and I have faced the same issue on AS 3.1.2, but a simple Sync didn't help us. For us, the solution was a bit different:
File -> Invalidate Caches -> Invalidate
File -> Close Project.
Remove the project from the AS project selector window.
Quit from Android Studio
Start AS and open project again
EXTRA ADVICE IF YOU ARE FACING THIS ISSUE CONSTANTLY
Some of you are constantly facing this issue, and this "solution" fixes it only temporarily. At the time we started getting this error, we used gradle wrapper 4.6 and Android gradle plugin 3.1.0, but since then we went back to gradle 4.4 and we use it with the latest Android gradle plugin, and we haven't seen this issue since then.
In Android Studio 3 and above, for Windows, Mac and Linux:
File -> Sync Project with Gradle Files
Solved!
Or you can do this by shortcut key:
Press ⌘ + Shift + A (Mac) or Ctrl + Shift + A (Windows, Linux). Then pop-up a Edit-Text and write "Sync Project with Gradle Files". Then press double click on the option.
Your problem is solved! It'll sync your gradle file with your project file.
Screenshot:
Click this icon to sync gradle
or edit any of your module gradle and then sync
Press "Ctrl+shift+A" and in the pop-up EditText, write "Sync Project with Gradle Files". After that double click on the appeared option. It will then sync your Gradle file SDK with the project file.
Just go to the (app level) build.gradle file, give an empty space somewhere and click on sync, once gradle shows sync complete then the Error will be gone
This is the easiest way to fix this issue:
Add a comment line to the gradle file
It will then ask you to Sync.
Click 'Sync Now'
Viola! You're done.
Now on Android Studio 3 and above, you can try to sync project with gradle like:
File -> Sync Project with Gradle Files
The menu structure and options have changed slightly as of Android 3.2.0. I fixed this error by changing the Module SDK in the following menu:
File > Project Structure > Modules > App File > Dependencies Tab > Module SDK
Make sure to hit Apply to save your changes.
The comment from #Nisarg helped: "set latest version in Compile Sdk Version"
I changed from API 8 to API 23 and the error message disappeared.
Press the first refresh button on the gradle vertical tab in Android Studio on the right
Press " ⌘ + Shift + A" on Mac (or "Ctrl+Shift+A" on Windows) and in the pop-up EditText, write "Sync Project with Gradle Files". After that double click on the appeared option. It will then sync your Gradle file SDK with the project file.
Follow these steps:
Goto Android Studio Settings
Search for "Android SDK" using search bar
Ensure the path to your android sdk folder is correct.
After that also ensure the path is automatically updated after a prompt in your project (local.properties) file. If not, do it manually.
Hope this helps.
There are multiple hit & trial solutions for this error. One of them will surely work for you.
Below are the solutions:
1.
Tools -> Android -> Sync Project with Gradle Files (Android Studio
3.0.1)
Go to build.gradle and click sync now
Click hammer(Build) icon to sync Gradle
or edit any of your module Gradle and then sync
File -> Settings -> Android SDK -> Android SDK Location Edit ->
Android SDK
Open build.gradle file, just add a space or press enter. Then sync
project.
File -> Invalidate Caches / Restart
Go to File >> ProjectStructure(⌘;). This would open this window then select the app module. Then choose the Compile SDK version . Choose the latest one and click apply.
I was having this problem on all versions of AS 3.0+. Syncing with gradle did not solve the problem for me. The solution from András Klöczl was the only thing that would allow me to get some coding done. The problem was, anytime I had to do a gradle sync, the problem came back. So I had to go through that process any time I wanted to make a change in my build.gradle. What ended up working for me was to downgrade my kotlin version from 1.2.40 to 1.2.30
My problem was that if I changed the project (for example opened new window of Android Studio with different project) this error happened.
So I read every answer in this question and the "clear caches and open the project again" solution wasn't so useful in my case.
Instead I discovered that if the Kotlin's plugin's version in Android Studio was lower than in gradle file, the problem appeared.
My setup was:
Android Studio 3.1.3
Kotlin plugin (in Android Studio) 1.2.30
Kotlin version in gradle file 1.2.51
What fixed the problem?
I updated the Kotlin plugin:
File -> Settings -> Plugins -> Install JetBrains plugin...
Then search for Kotlin and click Update. After update just restart the Android Studio and sync Gradle.
Just change build tools version to 25.0.3.. and sync now
I hope it will help..
This worked for me.
File -> Settings -> Android SDK -> Android SDK Location Edit -> Android SDK
Go to : File > Project Structure > Modules -> app > Properties
please choose : Compile 'SDK' version = API26 Build Tools
Version = 27.0.0 Source Compatibility = 1.8 Target Compatibility =
1.8
open build.gradle file. just add a space or press enter. then sync project. it works...
Sometimes android studio just acts stupid and needs some kind of reset..
Go to settings.gradle file it should contain include ':app'
change it to include ':ap' and sync.
after sync, change it to include ':app' again.
It should be working OK now.
The simplest solution for this problem:
First make sure your sdk path is currect.
Then
Please close current project and in android startup menu click on import project and choose your project from explorer.
This will always solve my problem
In my case there there is no selected java sdk version in project structure-
I had to select the -
1.Source Compatibility (1.7)
2.Target Compatibility (1.7)
as shown in image.
If you are using 'Profile or Debug APK...', then you might come across this error.
My solution is to first check SDK for updates in SDK manager: click on "Edit" at the right side of SDK location and go through to install any updates:
Then I clicked on "Logcat" at bottom of Android Studio and find out I also need to configure Android SDK, so choose latest Android API Platform:
After that, I'm able to run the APK in Emulator.
In latest android studio 3.3.2 the icon of sync project with Gradle Files is changed
Now try this
File -> Sync Project with Gradle Files (Android Studio 3.3.2)
For Android Studio 3.5, "File -> Sync project with gradle files" is enough.
Go to gradle.build file and click sync now
OR
click icon on Sync project with Gradle file
OR
Go to Tools-> Android -> Sync project with Gradle file
If your android SDK path is given and still you facing this issue then it might because your android studio not synced well, even you have clicked on "Sync now" link.
So for re sync it go to app gradle file and make any change or just give a space and now sync again. It will work perfectly.
In my case I downloaded a git repository for an android project. The project required minimum sdk version 21 and target sdk version 27. When I tried to run the project it gave me "Please select Android SDK error". I checked that I had already downloaded the required sdk files.
For me the solution was to "sync project with Gradle Files"

Siddhi javascript error could not initialize class io.siddhi.extension.script.js.EvalJavaScript

When I try to use a javascript function I get this error: "could not initialize class io.siddhi.extension.script.js.EvalJavaScript"
I see in the lib folder that the siddhi-script-js-5.0.3.jar is there, both in the runner and the tooling, do I need to install any more extension?
I think there is a BUG in Siddhi with the javascrpt plugin.
I add the Siddhi official example and there is an error, you can notice in the third image.
I guess this is an official bug from Siddhi-Docker, as the base JDK image used for the dockerization is a slim version, which doesn't have the NashornScript libraries for JS compilation.
The siddhi-runner works on using a non-slim version of base JDK image. I have verified it locally and it works well. My pull request is pending for review.
https://github.com/siddhi-io/docker-siddhi/pull/33

Build hangs in Tizen IDE 2.4

I am using Samsung Tizen IDE 2.4.0 Rev5 for building Apps for Samsung Tizen TV(emulator - version 2.4).
I created an App which plays video using HTML5 player.
I want to use video.js along with the HTML5 player for playing the videos. So I took it from:
https://github.com/videojs/video.js/releases (Version 5.10.1)
The issue which I am facing is that when I build the project, it (the build) hangs when it tries to build video.js. This happens every time. However, if I use video.min.js (which I believe is the obfuscated version of the same file) instead of video.js, I do not see any such build issue and I am able to run the project.
The tizen SDK is build on top on eclipse, so I checked the following question:
Eclipse building workspace hangs after importing existing maven project because of JavaScript validation
Where similar issue was faced and the solution was to disable javascript validation. However I checked my project files and javascript validation was anyway not enabled.
This could be an issue with R5. We have a product which builds fine with R3 & R4. When we upgraded to R5, the build would hang because of the size of our 'browswerified' client library file. When we rolled back to R4, the project built again. Samsung support has privately confirmed to me that they can reproduce the issue with our project.
I would encourage you to log a 'Q&A 1:1' through the Seller Office (http://seller.samsungapps.com/tv/portal/main).

Google Play reject Cordova application 'cause contains security vulnerabilities for users

I developed an application on Apache Cordova, I followed all the steps to generate the .apk to upload on Google Play. I tried many times but Google's response is the same:
We rejected APP, package ID com.xxx.app, for violating our dangerous products policy. If you submitted an update, the previous version of
your app is still available on Google Play. This app uses software
that contains security vulnerabilities for users. Below is the list of
vulnerabilities and the corresponding APK versions that were detected
in your recent submission. Please upgrade your app(s) as soon as
possible and increment the version number of the upgraded APK.
Vulnerability Apache Cordova: The vulnerabilities were fixed in Apache Cordova v.3.5.1.
I have the latest version of Cordova (5.4.1).
The following will detail the steps that I followed for installation and project development:
Start the download of Cordova from the console Node.js using the command npm install -g Cordova.
Install Java: version 1.8.0_65.
Install Android SDK.
Add Java and SDK to PATH.
I downloaded the necessary components of the Android SDK.
Create the project through the commands. (Cordova create Projectxxxx).
Add the Android platform.
I copied my application code in the www folder.
Add the plugins needed for my project: splashscreen and sqlite.
I tested the application on the Android emulator and other mobile phones. All good. Runs perfect.
To create the signed APK file, these are the steps:
-Cordova build --release android. (This generated the android-release-unsigned.apk on platforms / android / build / outputs
/ apk).
-Then, I generated the keystore.
-After the jarsigner.
-Finally: zipalign.
I upload end-app.apk to Google Play.
Another detail that I have is that cordova.js generated version is 4.1.1. But the console version is 5.4.1 (Command: Cordova -version).
I did everything by node.js console.
Attemps:
I uploaded an APK without js components. Only with cordova.js and it not worked.
I installed all over again in a newly installed windows and neither worked.
My version is higher than 3.5.1. I can not find the solution.
The big problem is not just that PLATFORM_VERSION_BUILD_LABEL is wrong, but the default cordova used is ancient ( it was 3.7.1 on mine ). To resolve this you need to install a newer version in the project. You can specify this on the command line, much like npm does.
cordova platform update android#4.1.1
Or you can specify it in your config.xml
<engine name="android" version="4.1.1" />
That may need 'spec' instead of 'version' depending on how current you cordova install is. At this point, they are up to 5.1, and you can use 'latest' instead of a specific version number.
The next headache will be the point of the patch, which locks down network access. I am now getting 404 errors on all my ajax calls to our server. Access was the root of the security problem, so this isn't a big surprise. I am still working on that.
I had the same problem, I found a previous corodva version in a plugin, in my case was facebook connect; I deleted this plugin and upload again, its work form me. You may search PLATFORM_VERSION_BUILD_LABEL in your project, is posible that some plugin have other cordova version.
I was trying to solve this problem almost for a week. Solution:
There was a cordova.js file within www/lib/cordova folder that doesn't get updated when you update cordova and ionic. Open the file and look for var PLATFORM_VERSION_BUILD_LABEL. If the version is not 4.1.1 at the time of this post, update it with another copy of the file that is somewhere in your main directory.

Two cordova-plugin-device plugins

I have just added the cordova plugin com.phonegap.plugin.mobile-accessibility to my ionic project, and it had automatically installed cordova-plugin-device as it is its dependency.
This would be fine, but I already have the plugin installed (as a dependancy of another plugin) under a different name (org.apache.cordova.device). Has anyone got any ideas on whether I should keep both, or how I could remove one.
I think that having both of these plugins is causing the following error and stopping me from building the App.
[INFO:CONSOLE(59)] "Uncaught module cordova-plugin-device.device not found", source: file:///android_asset/www/cordova.js (59)
I have screen dumped the dependency errors I get when trying to uninstall one of the plugins.
Easy enough fix, I removed the android platform and then re-added it again. As it went through the install it skipped the second cordova-plugin-device plugin install so now the platform only has it once.
The App now builds and works as it should.
Answer was found here - http://forum.ionicframework.com/t/plugins-does-not-exist/2980/5
NOTE: did not need to remove and add ionic & Cordova, only the Android and iOS platforms

Categories

Resources