Closed
Labels
Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.
Description
Is this a bug report?
Yes,
Have you read the [Contributing Guidelines]
Yes,
Environment
Environment:
OS: macOS High Sierra 10.13.2
Node: 6.9.2
Yarn: 1.3.2
npm: 5.5.1
Watchman: 4.5.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
react-native: ^0.48.3 => 0.48.3
Target Platform: iOS (10.3)
Steps to Reproduce
- create android with multiple productFlavors (demo, full and etc)
- build different flavor app on android device by running this command,
react-native run-android --variant=demoDebug
or
react-native run-android --variant=fullDebug
flavorDimensions "app"
productFlavors {
demo {
dimension "app"
applicationId "com.demo"
resValue "string", "app_name", "demo"
manifestPlaceholders = [
appIcon: "@mipmap/ic_launcher_demo"
]
versionCode 1
versionName "1.0"
}
full {
dimension "app"
applicationId "com.full"
resValue "string", "app_name", "full"
manifestPlaceholders = [
appIcon: "@mipmap/ic_launcher_full"
]
versionCode 1
versionName "1.0"
}
}
Expected Behavior
expect different flavors of app will build on android device,
Actual Behavior
the build failed and i, i get this error
Error: Activity class {com.todo/com.todo.MainActivity} does not exist,
but I'm able to build the app successfully if i remove the productFlavors {}
any advice will be appreciate.
Reacted by Nguyễn Phúc Lương, tom, Samba, Songlcy, Vitor Reis, Amin Ameri and Derrick Beining
Metadata
Metadata
Assignees
Labels
Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.
Activity
react-native-bot commentedon Feb 24, 2018
Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version?
I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer.
How to Contribute • What to Expect from Maintainers
songxiaoliang commentedon Aug 20, 2018
same problem!
vitorreis commentedon Sep 7, 2018
Me too
adamnator92 commentedon Sep 8, 2018
0.56 still happen
johanforssell commentedon Sep 19, 2018
I'm writing new versions of old apps, and thus I have inherited old app id's.
My code have the package
com.common.package(in source files andAndroidManifest.xml).My
build.gradlecontainsFirst the app can be installed with gradlew
The I can start it manually with
This is a bloody hassle. I would rather not have to mess with it like this.
samzmann commentedon Oct 6, 2018
I ran into this issue and found some way to make it work:
I have two product flavors
prod, with applicationId "com.yetno.yetnoapp" (which is the main app id)dev, with applicationId "com.yetno.yetno_app"When building and running dev (
react-native run-android --variant=devDebug) I was getting the error described in this issue.Then I noticed, if I build the prod variant first and have it installed on the device, building and installing the dev variant works fine.
So the steps are:
cd android && ./gradlew cleancd ..react-native run-android --variant=prodDebugreact-native run-android --variant=devDebugSo this is not really an answer, but it worked for me and maybe it can help some of you guys out :)