简体   繁体   中英

React native build success but there is no release apk

I was working on this project since few months and everything was alright. We had several production builds using ./gradlew bundleRelease

But since few days I am not able to take production build using ./gradlew bundleRelease . I mean the log says eveything is success. Here is the log:

> $ ./gradlew bundleRelease WARNING: Configuration 'compile' is obsolete
> and has been replaced with 'implementation' and 'api'. It will be
> removed at the end of 2018. For more information see:
> http://d.android.com/r/tools/update-dependency-c                      
> onfigurations.html WARNING: Configuration 'compile' is obsolete and
> has been replaced with 'implementation' and 'api'. It will be removed
> at the end of 2018. For more information see:
> http://d.android.com/r/tools/update-dependency-c                      
> onfigurations.html WARNING: Configuration 'compile' is obsolete and
> has been replaced with 'implementation' and 'api'. It will be removed
> at the end of 2018. For more information see:
> http://d.android.com/r/tools/update-dependency-c                      
> onfigurations.html WARNING: The specified Android SDK Build Tools
> version (23.0.1) is ignored, as it is below the minimum supported     
> version (27.0.3) for Android Gradle Plugin 3.1.4. Android SDK Build
> Tools 27.0.3 will be used. To suppress this warning, remove
> "buildToolsVersion '23.0.1'" from your build.gradle file, as each
> version of the                                                        
> Android Gradle Plugin now has a default version of the build tools.
> WARNING: Configuration 'compile' is obsolete and has been replaced
> with 'implementation' and 'api'. It will be removed at the end of
> 2018. For more information see: http://d.android.com/r/tools/update-dependency-c                      
> onfigurations.html :react-native-ble-manager:preBuild UP-TO-DATE
> :react-native-ble-manager:preReleaseBuild UP-TO-DATE
> :react-native-ble-manager:compileReleaseAidl UP-TO-DATE
> :react-native-ble-manager:compileReleaseRenderscript UP-TO-DATE
> :react-native-ble-manager:checkReleaseManifest UP-TO-DATE
> :react-native-ble-manager:generateReleaseBuildConfig UP-TO-DATE
> :react-native-ble-manager:generateReleaseResValues UP-TO-DATE
> :react-native-ble-manager:generateReleaseResources UP-TO-DATE
> :react-native-ble-manager:packageReleaseResources UP-TO-DATE
> :react-native-ble-manager:platformAttrExtractor UP-TO-DATE
> :react-native-ble-manager:processReleaseManifest UP-TO-DATE
> :react-native-ble-manager:generateReleaseRFile UP-TO-DATE
> :react-native-ble-manager:prepareLintJar UP-TO-DATE
> :react-native-ble-manager:generateReleaseSources UP-TO-DATE
> :react-native-ble-manager:javaPreCompileRelease UP-TO-DATE
> :react-native-ble-manager:compileReleaseJavaWithJavac UP-TO-DATE
> :react-native-ble-manager:extractReleaseAnnotations UP-TO-DATE
> :react-native-ble-manager:mergeReleaseConsumerProguardFiles UP-TO-DATE
> :react-native-ble-manager:mergeReleaseShaders UP-TO-DATE
> :react-native-ble-manager:compileReleaseShaders UP-TO-DATE
> :react-native-ble-manager:generateReleaseAssets UP-TO-DATE
> :react-native-ble-manager:packageReleaseAssets UP-TO-DATE
> :react-native-ble-manager:packageReleaseRenderscript NO-SOURCE
> :react-native-ble-manager:processReleaseJavaRes NO-SOURCE
> :react-native-ble-manager:transformResourcesWithMergeJavaResForRelease
> UP-TO-DATE
> :react-native-ble-manager:transformClassesAndResourcesWithSyncLibJarsForRelease
> UP-TO-DATE :react-native-ble-manager:compileReleaseNdk NO-SOURCE
> :react-native-ble-manager:mergeReleaseJniLibFolders UP-TO-DATE
> :react-native-ble-manager:transformNativeLibsWithMergeJniLibsForRelease
> UP-TO-DATE
> :react-native-ble-manager:transformNativeLibsWithSyncJniLibsForRelease
> UP-TO-DATE :react-native-ble-manager:bundleRelease UP-TO-DATE
> :react-native-datawedge-intents:preBuild UP-TO-DATE
> :react-native-datawedge-intents:preReleaseBuild UP-TO-DATE
> :react-native-datawedge-intents:compileReleaseAidl UP-TO-DATE
> :react-native-datawedge-intents:compileReleaseRenderscript UP-TO-DATE
> :react-native-datawedge-intents:checkReleaseManifest UP-TO-DATE
> :react-native-datawedge-intents:generateReleaseBuildConfig UP-TO-DATE
> :react-native-datawedge-intents:generateReleaseResValues UP-TO-DATE
> :react-native-datawedge-intents:generateReleaseResources UP-TO-DATE
> :react-native-datawedge-intents:packageReleaseResources UP-TO-DATE
> :react-native-datawedge-intents:platformAttrExtractor UP-TO-DATE
> :react-native-datawedge-intents:processReleaseManifest UP-TO-DATE
> :react-native-datawedge-intents:generateReleaseRFile UP-TO-DATE
> :react-native-datawedge-intents:prepareLintJar UP-TO-DATE
> :react-native-datawedge-intents:generateReleaseSources UP-TO-DATE
> :react-native-datawedge-intents:javaPreCompileRelease UP-TO-DATE
> :react-native-datawedge-intents:compileReleaseJavaWithJavac UP-TO-DATE
> :react-native-datawedge-intents:extractReleaseAnnotations UP-TO-DATE
> :react-native-datawedge-intents:mergeReleaseConsumerProguardFiles
> UP-TO-DATE :react-native-datawedge-intents:mergeReleaseShaders
> UP-TO-DATE :react-native-datawedge-intents:compileReleaseShaders
> UP-TO-DATE :react-native-datawedge-intents:generateReleaseAssets
> UP-TO-DATE :react-native-datawedge-intents:packageReleaseAssets
> UP-TO-DATE :react-native-datawedge-intents:packageReleaseRenderscript
> NO-SOURCE :react-native-datawedge-intents:processReleaseJavaRes
> NO-SOURCE
> :react-native-datawedge-intents:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
> :react-native-datawedge-intents:transformClassesAndResourcesWithSyncLibJarsForRelease
> UP-TO-DATE :react-native-datawedge-intents:compileReleaseNdk NO-SOURCE
> :react-native-datawedge-intents:mergeReleaseJniLibFolders UP-TO-DATE
> :react-native-datawedge-intents:transformNativeLibsWithMergeJniLibsForRelease
> UP-TO-DATE
> :react-native-datawedge-intents:transformNativeLibsWithSyncJniLibsForRelease UP-TO-DATE :react-native-datawedge-intents:bundleRelease UP-TO-DATE
> :react-native-device-info:preBuild UP-TO-DATE
> :react-native-device-info:preReleaseBuild UP-TO-DATE
> :react-native-device-info:compileReleaseAidl UP-TO-DATE
> :react-native-device-info:compileReleaseRenderscript UP-TO-DATE
> :react-native-device-info:checkReleaseManifest UP-TO-DATE
> :react-native-device-info:generateReleaseBuildConfig UP-TO-DATE
> :react-native-device-info:generateReleaseResValues UP-TO-DATE
> :react-native-device-info:generateReleaseResources UP-TO-DATE
> :react-native-device-info:packageReleaseResources UP-TO-DATE
> :react-native-device-info:platformAttrExtractor UP-TO-DATE
> :react-native-device-info:processReleaseManifest UP-TO-DATE
> :react-native-device-info:generateReleaseRFile UP-TO-DATE
> :react-native-device-info:prepareLintJar UP-TO-DATE
> :react-native-device-info:generateReleaseSources UP-TO-DATE
> :react-native-device-info:javaPreCompileRelease UP-TO-DATE
> :react-native-device-info:compileReleaseJavaWithJavac UP-TO-DATE
> :react-native-device-info:extractReleaseAnnotations UP-TO-DATE
> :react-native-device-info:mergeReleaseConsumerProguardFiles UP-TO-DATE
> :react-native-device-info:mergeReleaseShaders UP-TO-DATE
> :react-native-device-info:compileReleaseShaders UP-TO-DATE
> :react-native-device-info:generateReleaseAssets UP-TO-DATE
> :react-native-device-info:packageReleaseAssets UP-TO-DATE
> :react-native-device-info:packageReleaseRenderscript NO-SOURCE
> :react-native-device-info:processReleaseJavaRes NO-SOURCE
> :react-native-device-info:transformResourcesWithMergeJavaResForRelease
> UP-TO-DATE
> :react-native-device-info:transformClassesAndResourcesWithSyncLibJarsForRelease
> UP-TO-DATE :react-native-device-info:compileReleaseNdk NO-SOURCE
> :react-native-device-info:mergeReleaseJniLibFolders UP-TO-DATE
> :react-native-device-info:transformNativeLibsWithMergeJniLibsForRelease
> UP-TO-DATE
> :react-native-device-info:transformNativeLibsWithSyncJniLibsForRelease
> UP-TO-DATE :react-native-device-info:bundleRelease UP-TO-DATE
> :react-native-vector-icons:preBuild UP-TO-DATE
> :react-native-vector-icons:preReleaseBuild UP-TO-DATE
> :react-native-vector-icons:compileReleaseAidl UP-TO-DATE
> :react-native-vector-icons:compileReleaseRenderscript UP-TO-DATE
> :react-native-vector-icons:checkReleaseManifest UP-TO-DATE
> :react-native-vector-icons:generateReleaseBuildConfig UP-TO-DATE
> :react-native-vector-icons:generateReleaseResValues UP-TO-DATE
> :react-native-vector-icons:generateReleaseResources UP-TO-DATE
> :react-native-vector-icons:packageReleaseResources UP-TO-DATE
> :react-native-vector-icons:platformAttrExtractor UP-TO-DATE
> :react-native-vector-icons:processReleaseManifest UP-TO-DATE
> :react-native-vector-icons:generateReleaseRFile UP-TO-DATE
> :react-native-vector-icons:prepareLintJar UP-TO-DATE
> :react-native-vector-icons:generateReleaseSources UP-TO-DATE
> :react-native-vector-icons:javaPreCompileRelease UP-TO-DATE
> :react-native-vector-icons:compileReleaseJavaWithJavac UP-TO-DATE
> :react-native-vector-icons:extractReleaseAnnotations UP-TO-DATE
> :react-native-vector-icons:mergeReleaseConsumerProguardFiles
> UP-TO-DATE :react-native-vector-icons:mergeReleaseShaders UP-TO-DATE
> :react-native-vector-icons:compileReleaseShaders UP-TO-DATE
> :react-native-vector-icons:generateReleaseAssets UP-TO-DATE
> :react-native-vector-icons:packageReleaseAssets UP-TO-DATE
> :react-native-vector-icons:packageReleaseRenderscript NO-SOURCE
> :react-native-vector-icons:processReleaseJavaRes NO-SOURCE
> :react-native-vector-icons:transformResourcesWithMergeJavaResForRelease
> UP-TO-DATE
> :react-native-vector-icons:transformClassesAndResourcesWithSyncLibJarsForRelease
> UP-TO-DATE :react-native-vector-icons:compileReleaseNdk NO-SOURCE
> :react-native-vector-icons:mergeReleaseJniLibFolders UP-TO-DATE
> :react-native-vector-icons:transformNativeLibsWithMergeJniLibsForRelease
> UP-TO-DATE
> :react-native-vector-icons:transformNativeLibsWithSyncJniLibsForRelease
> UP-TO-DATE :react-native-vector-icons:bundleRelease UP-TO-DATE
> 
> BUILD SUCCESSFUL in 2s 92 actionable tasks: 92 up-to-date

Here is my target SDK and other information:

build.gradle:

buildToolsVersion = "27.0.3"
minSdkVersion = 16
compileSdkVersion = 27
targetSdkVersion = 26
supportLibVersion = "27.1.1"

I found a solution: Instead of running ./gradlew bundleRelease run ./gradlew app:assemblerelease . It generated the APK properly.

Search the .apk file. It usually lies in build folder

Try running this code "cd android && ./gradlew assembleRelease && open './app/build/outputs/apk/'

只需运行以下命令

 cd android && ./gradlew app:assembleRelease && cd ..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM