react-native-colo-loco
react-native-colo-loco copied to clipboard
[Android] Ignited app with colo loco breaks when building on AppCenter
I built a new app with Ignite (love it!), and it builds fine locally.
When I build in Android Studio it works fine. When I build it on AppCenter, it fails and points to Colo Loco:
* Where:
Script '/Users/runner/work/1/s/ThriveBusiness/node_modules/react-native-colo-loco/scripts/android.groovy' line: 17
* What went wrong:
A problem occurred evaluating settings 'android'.
> /Users/runner/work/1/app does not exist.
The only non-standard part of my Ignite setup is that I use /src instead of /app for my JS folder. I've tried both of these in settings.gradle
apply from: '../node_modules/react-native-colo-loco/scripts/android.groovy'
linkColocatedNativeFiles([
appPath: "../app", // also tried using "../src"
appPackageName: "com.myappname",
androidPath: "./android/app/src/main/java/com/myappname"
])
I can see that whatever I change this appPath to is what comes out in the AppCenter build error as not existing, e.g. if I make it ../app it will say > /Users/runner/work/1/app does not exist.
, and if I do ../src it will say > /Users/runner/work/1/src does not exist.
May be a clue. Either way, I've opted to remove colo loco from my project for now.
I experienced this also, my Appcenter Android build fails because of this package, I opted to remove this also from my project.
This is what comes out from the log.
FAILURE: Build failed with an exception.
* Where:
Script '/Users/runner/work/1/s/node_modules/react-native-colo-loco/scripts/android.groovy' line: 17
* What went wrong:
A problem occurred evaluating settings 'android'.
> /Users/runner/work/1/app does not exist.
Does it work if the source code is put in an app
folder?
Does it work if the source code is put in an
app
folder?
Not sure what you're mean, but here's how I arrange my project folder.
also, I didn't really use this package cuz It was just bundled with ignite.

Anyway, my appcenter build are back running right now after I remove it from package.json
.
for those who has the same problem make sure to remove some related line from settings.gradle
& Podfile
I created a new Ignite app and tried building it in AppCenter to figure out where the problem is and looks like it's because of the System.getProperty('user.dir')
resolving to the app root /Users/runner/work/1/s
instead of /Users/runner/work/1/s/android
, I guess we should find a better way to get the current directory because the System.getProperty('user.dir')
is relative to where the build command is executed.
Is it possible to cd
into the app folder in your App Center build script before running the app? Running it from the parent folder seems a little odd to me.
+1 I'm setting up App Center right now and just ran into this issue myself.
I'd love help resolving this, if anyone has ideas!
I'm not sure why this happens to be the case, but maybe we can try using rootDir
instead of System.getProperty('user.dir')
.
Hi everyone
i have a problem like it
can someone help me to solve it? Please
Hi everyone i have a problem like it can someone help me to solve it? Please
![]()
Could you check your gradle?, this discussion is mainly for those who have an issue during build on App Center & seems like you just have an issue with your gradle
Hi everyone i have a problem like it can someone help me to solve it? Please
![]()
Could you check your gradle?, this discussion is mainly for those who have an issue during build on App Center & seems like you just have an issue with your gradle
thanks bro. i'm trying to fix it.