Meteor build - Failed to install cordova-plugin-inappbrowser

Hi everyone,

I tried to build apk using meteor build, but getting this error. Please help, any help would be appreciated.

Please check this error,

Failed to install 'cordova-plugin-inappbrowser': Error: /media/bird/2AE477A5E4777245/bitovn/.meteor/local/cordova-build/platforms/android/gradlew: Command failed with exit code 1
    at ChildProcess.whenDone (/media/bird/2AE477A5E4777245/bitovn/.meteor/local/cordova-build/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:927:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

Is there any confict with outh package? Let me know if this could be one of the concern

Hey, in the screenshot there is this field

And it seems like build is failed after this warning

So maybe you want to take a look at license agreement related part first.

Hi @cyardimci, I encounter this before but I run ./sdkmanager --licenses to resolve this, and it’s resolved then but its coming again, could you help in solving the same?

Hi @cyardimci, Check this

Umm, can you run build with --verbose ? Maybe this generates more meaningful logs to inspect.

Also you are sure that your app satisfies the following checks right ?

Meteor or later: Android SDK Tools v.25.2.x (mac, linux, windows) or v.26.0.0 or later

v.25.3.0 will not work due to extensive changes. See issue #8464 for more information.

Meteor 1.4.2.x or before: Android SDK Tools v.23 (mac, linux, windows)

@cyardimci Please Check this and let me know if something is wrong

Umm actually I am a bit confused here :confused:

So when I check the screenshots, there is a something which seems inconsistent.

In your screenshots related to building, your ANDROID_HOME env variable is set as the following

However, in your screenshot related to licenses, you run the ./sdkmanager inside the following folder

Shouldn’t these two be the same ?

When I echo $ANDROID_HOME in my local, I have the following path /home/someFolder/Android/Sdk which is similar to the path in the second screenshot.

Can you check android env. variable related parts in official doc
Maybe there is something wrong with that

okay, Now I set the Android_sdk path to correct location,

export ANDROID_HOME=~/Android/Sdk
$ PATH=$PATH:$ANDROID_HOME/platform-tools `

Now its printing the same path on which I am working,

@cyardimci, is there a need for creating a config.xml file while creating build?

I got the same error again, please check

Nope. If you want to write/ change something, instead of directly editing config.xml, you should create mobile-config.js file in your application. Meteor reads that file. You can get more details about config.xml by checking the related part in official documentation.

Regarding to your new error, if you check your ANDROID_HOME env variable, it looks like it hasn’t changed

When you run cat ~/.bashrc what is the line related ANDROID_HOME

I run the same command but ANDROID_SDK was not found in it. PLease check this screen shot

Please guide me in setting path in right way

Hey, so for the rest of the day, I might not be able to provide full support (time differences, it’s getting a bit late here :slight_smile: )

But what I can do is providing some steps for you to follow based on my findings (by the way, fixing env variable might not be the solution but it seems like a possible candidate)

  1. First of all you need to make sure that, your ANDROID_HOME variable is set correctly as I suggested. And maybe you can google stuff like ubuntu permanently set environment variable
    For instance, this is one of the links that seems useful
  2. Secondly, whenever you have an error, make sure you read every line (not necessarily that much detailed though) and try to fix possible weird stuff one by one (For instance the first thing I checked in your screenshots are the environmental variables :slight_smile:)

When you fix env variable stuff, please give it a run and if you encounter any errors (hopefully no error or something different or more useful) let’s share here so we can check what we can do about it further.

In the meantime, maybe someone more experienced about these kind of problems can offer another approach :slight_smile:

1 Like

Thanks @cyardimci, for your assistance. I finally generate the apk.