Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create app shortcut android #27189

Closed
januarsmad opened this issue Nov 11, 2019 · 2 comments
Closed

Cannot create app shortcut android #27189

januarsmad opened this issue Nov 11, 2019 · 2 comments
Labels
Bug Needs: Author Feedback Needs: Issue Template This issue does not make use of the Issue Template, and may be missing necessary information. Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.

Comments

@januarsmad
Copy link

i'm currently using RN v.0.59.6, already migrate my project to androidx and so i'm using jetifier. after trying to installDebug by running it with npx react-native run-android, it did success and the aps run just fine. But i found out that there's no app shortcut created on the device.
Then i try to assembleRelease my aps, uploaded to apphost, installed it and the result is the same.
Anyone knows how to fix this?

Thank's for every reply.

Here's my project settings
Android Gradle Plugin Version: 3.4.2
Gradle Version: 5.1.1

android/app/build.gradle

buildscript {
    repositories {
        maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
    }
    dependencies {
        classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.1, 0.99.99]'
    }
}

apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: "com.android.application"

import com.android.build.OutputFile

project.ext.react = [
    entryFile: "index.js"
]

apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
apply from: "../../node_modules/react-native-sentry/sentry.gradle"

def enableSeparateBuildPerCPUArchitecture = true
def enableProguardInReleaseBuilds = false

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    defaultConfig {
        applicationId "com.xx"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 6
        versionName "0.52.0"
        missingDimensionStrategy 'react-native-camera', 'general'
        multiDexEnabled true
    }
    signingConfigs {
        release {
            if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
                storeFile file(MYAPP_RELEASE_STORE_FILE)
                storePassword MYAPP_RELEASE_STORE_PASSWORD
                keyAlias MYAPP_RELEASE_KEY_ALIAS
                keyPassword MYAPP_RELEASE_KEY_PASSWORD
            }
        }
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            signingConfig signingConfigs.release
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

dependencies {
    implementation project(':@react-native-firebase_app')
    implementation project(':@react-native-firebase_analytics')
    implementation project(':react-native-appsflyer')
    implementation project(':react-native-code-push')
    implementation project(':react-native-device-info')
    implementation project(':react-native-sentry')
    implementation project(':react-native-image-picker')
    implementation project(':react-native-fbsdk')
    implementation project(':react-native-google-signin')
    implementation project(':react-native-onesignal')
    implementation project(':react-native-svg')
    implementation project(':react-native-camera')
    implementation project(':react-native-vector-icons')
    implementation (project(':react-native-maps')){
        exclude group: 'com.google.android.gms', module: 'play-services-base'
        exclude group: 'com.google.android.gms', module: 'play-services-maps'
    }
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'com.android.support:multidex:1.0.0'
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.google.android.gms:play-services-auth:${rootProject.ext.googlePlayServicesAuthVersion}"
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation "com.facebook.fresco:animated-gif:1.10.0"
    implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
    implementation "com.google.android.gms:play-services-base:16.0.0"
    implementation "com.google.android.gms:play-services-maps:16.0.0"
    implementation "com.google.android.gms:play-services-gcm:16.0.0"
    implementation "com.google.android.gms:play-services-location:16.0.0"
    implementation "com.google.firebase:firebase-core:16.0.9"
}

task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

apply plugin: 'com.google.gms.google-services'
android/build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 28
        supportLibVersion = "28.0.0"
        googlePlayServicesAuthVersion = "16.0.1"
    }
    repositories {
        google()
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'
        classpath 'com.google.gms:google-services:4.1.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenLocal()
        maven {
          url 'https://maven.google.com'
          name 'Google'
        }
        jcenter()
        maven {
          url "https://jitpack.io"
        }
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}

my project dependencies

"dependencies": {
    "@react-native-firebase/analytics": "^6.0.3",
    "@react-native-firebase/app": "^6.0.3",
    "immutable": "3.8.2",
    "moment": "^2.24.0",
    "react": "16.8.3",
    "react-native": "^0.59.6",
    "react-native-appsflyer": "^1.4.5",
    "react-native-calendars": "^1.208.0",
    "react-native-camera": "^2.6.0",
    "react-native-code-push": "^5.6.1",
    "react-native-countdown-component": "^2.6.0",
    "react-native-device-info": "^2.3.2",
    "react-native-fbsdk": "^0.8.0",
    "react-native-google-maps": "^1.0.0",
    "react-native-google-places-autocomplete": "^1.3.9",
    "react-native-google-signin": "^2.0.0",
    "react-native-image-picker": "^0.28.1",
    "react-native-keyboard-aware-scroll-view": "^0.8.0",
    "react-native-maps": "^0.24.2",
    "react-native-modal-datetime-picker": "^7.4.2",
    "react-native-onesignal": "^3.2.12",
    "react-native-progress": "^3.6.0",
    "react-native-router-flux": "^4.0.6",
    "react-native-sentry": "^0.43.2",
    "react-native-svg": "^9.4.0",
    "react-native-svg-charts": "^5.2.0",
    "react-native-vector-icons": "^6.4.2",
    "react-redux": "^7.0.2",
    "redux": "^4.0.1",
    "redux-persist": "^5.10.0",
    "redux-thunk": "^2.3.0",
    "victory-native": "^32.0.2"
  },
@januarsmad januarsmad added the Bug label Nov 11, 2019
@react-native-bot react-native-bot added the Platform: Android Android applications. label Nov 11, 2019
@react-native-bot
Copy link
Collaborator

Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety?

👉 Click here if you want to take another look at the Bug Report issue template.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Resolution: Needs More Information labels Nov 11, 2019
@hramos hramos added Needs: Author Feedback Needs: Issue Template This issue does not make use of the Issue Template, and may be missing necessary information. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. and removed Resolution: Needs More Information labels Jan 18, 2020
@hramos
Copy link
Contributor

hramos commented Jan 21, 2020

Closing after several months without followup from the author. Please make sure to fill in the issue template if you decide to file a new issue.

@hramos hramos closed this as completed Jan 21, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Oct 2, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Needs: Author Feedback Needs: Issue Template This issue does not make use of the Issue Template, and may be missing necessary information. Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants