-
Notifications
You must be signed in to change notification settings - Fork 2
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 run app in device emulator #66
Comments
11:57 2022-09-04
Not sure that's the right way to do it, but it seems to have gotten me past that hurdle. When I then ran npm run ios-dev it suggested that a rebuild the app with: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace MushroomObserver.xcworkspace -configuration Debug -scheme MushroomObserver -destination id=69BBABFD-6E13-4235-B063-D8401498ED9E
and at the end it is saying
Not sure how to proceed from here. |
@mo-nathan
12:13 |
06:55 06:56 |
[9:14 AM] 2022-09-05
|
09:23
Then
I did not try to “debug build logs further” because I would not have understood anything. (edited) |
From email thread on Jan 21, 2024:
|
Looked at the Android side of this for a while today. I think the current issue is we need to upgrade Gradle, but it's non-trivial. I don't have a very good understanding of what all that involves. |
Starting from the current main branch of the repo (dc479b1), I have tried the following in Android Studio Hedgehog | 2023.1.1 (Build #AI-231.9392.1.2311.11076708, built on November 9, 2023): Prep/Reset
In Andriod Studio
|
Quit and restarted Android Studio. When I re-entered it kicked off some sort of build that I couldn't get to happen before. It's now reporting: "Gradle DSL method not found: 'uploadArchives()'" and it's recommending that I "Upgrade plugin to version 8.2.0 and sync project". |
Now it's reporting: "Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace." |
Learned about Tools -> AGP Upgrade Assistant in Android Studio. AGP = Android Gradle Plugin. Gradle is the project build tool used by Android Studio. It's like |
Initialization
At this point select File -> Project Structure should indicate that it's using Android Gradle Plugin Version 4.2.2 and Gradle version 6.9. |
Bringing up the Upgrade Assistant, it is recommending version 7.4.2 for the Android Gradle Plugin. By default "Update" is selected which will upgrade Gradle version to 7.5 and upgrade AGP dependency from 4.2.2 to 7.4.2. There are also options for "Recommended post-upgrade steps" which is "Move package from Android manifest to build files", and "Recommended steps" which is "Migrate packagingOptions DSL properties to sub-blocks". It claims these steps are not required, but I know it will hit a Java conflict if i just try to build things as they are. Only the "Upgrade" option is selected by default and that's what I tried last time and it seemed to mess stuff up a bit. This time I selected all the options and clicked "Run selected steps". Unfortunately that failed as well with the error:
|
Looking at the state of my local git repo after running the above, I see:
|
The most suspicious change in my opinion is:
|
Found this page which has WAY too many suggestions of what to do next: https://stackoverflow.com/questions/58952564/error-unable-to-determine-the-current-character-it-is-not-a-string-number-ar |
In line with both the above link and the above suspicion, I'm trying: |
It's also worth noting that File -> Project Structure now reports Android Gradle Plugin Version = 7.4.2 and Gradle Version = 7.5. |
Also the AGP Upgrade Assistant now wants to upgrade to 8.2.0. I'm going to hold off on that and see where things stand with 7.5. |
Hit the maven issue. I don't understand how to re-kickoff the Gradle build. Clicking on the little build icon gives me a popup that says "Unable to find Gradle tasks to build []". Did more poking and saw that it came across the GradleException issue. Now getting:
Doesn't seem to be doing much. |
After restarting Android Studio, it kicked of Gradle again. Now it's saying:
|
At this point I'm debating what the right strategy is for this work. Options include:
|
After installing Java 11, I ran into the uploadArchives() issue, but following the recommendations in https://stackoverflow.com/questions/70565069/could-not-find-method-uploadarchives-for-arguments-in-build-gradle I was able to get past this. I think ran into an issue where it was complaining about the version of Kotlin with errors that look like: I found a setting in Android Studio under Tools -> Kotlin -> Configure Kotlin in Project However, the oldest version that was available under "Kotlin compiler and runtime version:" was 1.8.20-RC. I tried selecting 1.8.22. It didn't work right away. So I went for a full clean rebuild including selecting 'File -> Invalidate Caches...', quitting Android Studio, deleting node_modules and ~/.gradle then running |
I was able to actually login from the Android Studio emulator after updating the .env.development to point to the real MO server with an appropriate API key. I think it's using .env.development because it's building the "debug" variant, but I'm 100% sure of that. I was able to get the emulator to connect with Metro for dynamic packaging by running: |
I'm copying messages from MO's Slack mobile-app channel because those messages are available for only 90 days.
The text was updated successfully, but these errors were encountered: