Runtime Error - module 'plugin.google.iap.v3' not found

I’m currently trying to get an In-App Subscription working, and I’ve got it set up perfectly fine for iOS, but on a Huawei device running Android I’m getting this error as soon as the app is launched:

Runtime Error module 'plugin.google.iap.v3' not found: resource(plugin.google.iap.v3.lu) does not exist in archive no field package.preload['plugin.google.iap.v3'] no file '(null)/plugin/google/iap/v3.lua' no file '(null)/plugin/google/iap/v3.lua' no file '/data/app/com.bundle.id/lib/arm64/libplugin/google/iap/v3.so' no file './plugin/google/iap/v3.so' no file '(null)/plugin/google/iap/v3.so' no file '/data/app/com.bundle.id/lib/arm64/libplugin.so' no file './plugin.so' no file '(null)/plugin.so'

I’m loading my products as follows:

local store targetAppStore = system.getInfo("targetAppStore") if ("apple" == targetAppStore) then -- iOS store = require("store") elseif ("google" == targetAppStore) then -- Android store = require("plugin.google.iap.v3") else print("In-app purchases are not available for this platform.") end function transactionListener(event) local transaction = event.transaction print(transaction.isError) print(transaction.state) print(transaction.productIdentifier) print(transaction.date) if (transaction.isError) then print(transaction.errorType) print(transaction.errorString) else -- No errors; proceed if ( transaction.state == "purchased" or transaction.state == "restored" ) then -- Handle a normal purchase or restored purchase here elseif ( transaction.state == "cancelled" ) then -- Handle a cancelled transaction here elseif ( transaction.state == "failed" ) then -- Handle a failed transaction here end -- Tell the store that the transaction is complete store.finishTransaction(transaction) end end -- Initialize store if store ~= nil then store.init(transactionListener) end productIdentifiers = { "my\_identifier", } local function productListener(event) for i = 1,#event.products do print(event.products[i].productIdentifier) end store.purchase("my\_identifier") end store.loadProducts(productIdentifiers, productListener) 

My build settings:

-- -- For more information on build.settings, see the Project Build Settings guide at: -- https://docs.coronalabs.com/guide/distribution/buildSettings -- settings = { orientation = { -- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight default = "portrait", supported = { "portrait", }, }, -- -- Android section -- android = { usesPermissions = { "android.permission.INTERNET", "com.android.vending.BILLING", }, }, -- -- iOS section -- iphone = { xcassets = "Images.xcassets", plist = { UIStatusBarHidden = false, UILaunchStoryboardName = "LaunchScreen", NSAppTransportSecurity = { NSAllowsArbitraryLoads = true, }, NSCameraUsageDescription = "Used to scan barcodes" }, }, -- -- Plugins section -- plugins = { ['plugin.qrscanner'] = { publisherId = 'com.spiralcodestudio' } }, -- -- Project section -- excludeFiles = { -- Exclude unnecessary files for each platform all = { "Icon.png", "Icon-\*dpi.png", "Images.xcassets", }, android = { "LaunchScreen.storyboardc", }, }, splashScreen = { enable = false }, }

Any help as to why I’m getting this issue would be great. I have just read on the forums about the store.init() being asynchronous for Google Play so I’m looking into that and if that would cause my issue, but I’d love any clarification on anything I’m missing here.

How about you add the plugin to the plugins in yer build settings? :smiley: then it might be found

Yeah I completely missed that stage out and noticed before the question even got approved. That was the issue and it’s fixed now, thank you.