React-native: assembleRelease success, but can't find the app-release.apk file on Windows 10

Created on 24 May 2017  路  6Comments  路  Source: facebook/react-native

Description

I'm trying to generating the signed APK. I got "build Success" by command "gradlew assembleRelease" and the app successfully installed on my android phone by command "react-native run-android --variant=release". However I can't find the APK file at "android/app/build/outputs/apk/app-release.apk". Actually, the "build" folder doesn't even exist in the "android/app" folder. Then I created the "android/app/build/outputs/apk/" folder by hand, and assembleRelease again, still can't find any APK.

I tried to search "app-release.apk" through the project folder, but nothing found.

Reproduction Steps and Sample Code

buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
       signingConfig signingConfigs.release
    }
}

1
2

Additional Information

  • React Native version: 0.44
  • Platform: Android
  • Development Operating System: windows 10
Locked

Most helpful comment

@byn9826 Nevermind - one of my developers added the following which trolled me for a good while until I spotted it:

buildDir = "C:/tmp/${rootProject.name}/${project.name}"

All 6 comments

This issue looks like a question that would be best asked on StackOverflow.

StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.

Will close this as this is really a question that should be asked on StackOverflow.

@byn9826 did you figure this out? I'm having the same problem.

@byn9826 Nevermind - one of my developers added the following which trolled me for a good while until I spotted it:

buildDir = "C:/tmp/${rootProject.name}/${project.name}"

Facing same issue from last 2 days. It would be great if somebody help!!

Thanks @jt3d ! I forgot that I had put this line in myself due to a "file name exceeds max length" error on my windows machine.

It's go on this path: \app\build\outputs\apk\release

Was this page helpful?
0 / 5 - 0 ratings