Cordova Slack Digest

Tue, 06 Apr 2021 08:22:48 GMT

User count: 4435

Join the conversation at slack.cordova.io

Channel #general (22 messages)


Mon, 05 Apr 2021 11:42:30 GMT

@terekhov says

Hello, everyone! Has someone faced similar task? On login, i need to check if user is starting newest app version, starting for the first time, if so - i will render some different components. Is there some cordova plugin to manage and detect app versions usage? Or i need some backend for that?

First i think of is just custom cookies, but they are always null on app start, cause web view instance is destroyed each time. So.... backend is must have here? (

Tue, 06 Apr 2021 02:56:21 GMT

@theus2719 says

Hello, I have been using ubuntu for a short time, and I have a problem generating a .apk with cordial, could someone help me?

Tue, 06 Apr 2021 02:56:36 GMT

@theus2719 says

Tue, 06 Apr 2021 02:56:48 GMT

@erisu says

Install JDK 1.8

Tue, 06 Apr 2021 03:01:05 GMT

@theus2719 says

generates the same error, I don't know how to configure the environment variables, maybe you did it wrong

Tue, 06 Apr 2021 03:02:20 GMT

@norman137 says

on ubuntu, you can set the environment variables by editing ~/.bashrc and adding the following:

export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"

Tue, 06 Apr 2021 03:02:38 GMT

@norman137 says

You'll need to open a new terminal to have the changes take effect

Tue, 06 Apr 2021 03:02:52 GMT

@norman137 says

running echo $JAVA_HOME should print out the variable value

Tue, 06 Apr 2021 03:03:27 GMT

@norman137 says

The file path is not guraneteed to be the same for your system, but I‘m running ubuntu as well so if you’re using openjdk8... it's probably hte same

Tue, 06 Apr 2021 03:04:03 GMT

@norman137 says

While you're there... you probably would want to add these as well...

Tue, 06 Apr 2021 03:04:47 GMT

@norman137 says

export ANDROID_HOME=$ANDROID_SDK_ROOT

export PATH="$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin"
export PATH="$PATH:$ANDROID_SDK_ROOT/platform-tools/"
export PATH="$PATH:$ANDROID_SDK_ROOT/emulator/"
export PATH="$PATH:$ANDROID_SDK_ROOT/build-tools/<your installed build tools verison (should be at least 29.x.x)/"
export PATH="$PATH:/development/Apps/gradle/bin"```
again... `/development/` and `/home/norman` paths will obviously differ... depending on where you decide to store your stuff

Tue, 06 Apr 2021 03:10:36 GMT

@theus2719 says

Tue, 06 Apr 2021 03:10:43 GMT

@theus2719 says

even with the changes, did I install it wrong?

Tue, 06 Apr 2021 03:11:14 GMT

@theus2719 says

Tue, 06 Apr 2021 03:12:29 GMT

@norman137 says

what's the output of java -version?

Tue, 06 Apr 2021 03:13:39 GMT

@theus2719 says

openjdk version “11.0.10” 2021-01-19 OpenJDK Runtime Environment (build 11.0.10+9-Ubuntu-0ubuntu1.20.04) OpenJDK 64-Bit Server VM (build 11.0.10+9-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)

Tue, 06 Apr 2021 03:14:33 GMT

@norman137 says

what if you do PATH="$JAVA_HOME/bin:$PATH java -version ?

Tue, 06 Apr 2021 03:15:47 GMT

@theus2719 says

PATH="$JAVA_HOME/bin:$PATH java -version openjdk version “1.8.0_282” OpenJDK Runtime Environment (build 1.8.0_282-8u282-b08-0ubuntu1~20.04-b08) OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)

Tue, 06 Apr 2021 03:17:35 GMT

@norman137 says

kk, so the problem is because you have two java installs (jav a8 install nad a java11) install and the java11 install is coming first so it ends up using java11 instead of java8.

Cordova requires java8 because that's what android tooling requires, so if you add export PATH="$JAVA_HOME/bin:$PATH" to your ~/.bashrc file (anywheres after the export JAVA_HOME="..." line) and start a new terminal session, that should make cordova happy.

Tue, 06 Apr 2021 03:18:51 GMT

@norman137 says

If you have other non-cordova related things that needs java11, you're gunna have to get creative with your environment.... on the bright site... Android tooling is suppose to support java11 soon....

Tue, 06 Apr 2021 03:29:45 GMT

@theus2719 says

thank you very much haha, I had to delete java 11, from ubuntu, but it worked

Tue, 06 Apr 2021 03:30:31 GMT

@theus2719 says

thank you very much Norman

Channel #cordova-android (2 messages)


Mon, 05 Apr 2021 16:30:18 GMT

@michael.a.oshea says

Hi all,

I'm having an ongoing problem.

My app (I Grow Chicken) in the Google Play Store doesn't show when searched for on an Android 11 device.

I have built an empty Cordova app (the base app that is generated by cordova create MyApp) and uploaded it to my internal test track.

It is visible to Android 10 and lower but it, like the I Grow Chicken app, is also invisible to owners of Android 11 devices.

Below, the AndroidManifest.xml file, can anyone spot anything wrong with it?

Thanks.

<manifest
    xmlns:android="<http://schemas.android.com/apk/res/android>"
    android:versionCode="210040501"
    android:versionName="5.9.5"
    android:hardwareAccelerated="true"
    android:compileSdkVersion="29"
    android:compileSdkVersionCodename="10"
    package="com.igrowchicken.hybridapp"
    platformBuildVersionCode="29"
    platformBuildVersionName="10"&gt;

    &lt;uses-sdk
        android:minSdkVersion="22"
        android:targetSdkVersion="30" /&gt;

    &lt;supports-screens
        android:anyDensity="true"
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:resizeable="true"
        android:xlargeScreens="true" /&gt;

    &lt;uses-permission
        android:name="android.permission.INTERNET" /&gt;

    &lt;application
        android:label="@ref/0x7f030001"
        android:icon="@ref/0x7f020000"
        android:hardwareAccelerated="true"
        android:supportsRtl="true"&gt;

        &lt;activity
            android:theme="@ref/0x01030129"
            android:label="@ref/0x7f030000"
            android:name="com.igrowchicken.hybridapp.MainActivity"
            android:launchMode="1"
            android:configChanges="0xfb4"
            android:windowSoftInputMode="0x10"&gt;

            &lt;intent-filter
                android:label="@ref/0x7f030002"&gt;

                &lt;action
                    android:name="android.intent.action.MAIN" /&gt;

                &lt;category
                    android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
    &lt;/application&gt;
&lt;/manifest&gt;```

Mon, 05 Apr 2021 20:42:28 GMT

@jcesarmobile says

I was going to say that there were a lot of people with that problem lately, but just noticed it’s you asking multiple times