proton:android_setupv3
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
proton:android_setupv3 [2022/08/01 06:06] – seth | proton:android_setupv3 [2025/03/04 07:24] (current) – seth | ||
---|---|---|---|
Line 21: | Line 21: | ||
- | == Final builds == | + | ==== Final builds |
I find it easiest to do final builds from the command line. | I find it easiest to do final builds from the command line. | ||
Line 27: | Line 27: | ||
* Run " | * Run " | ||
- | == Errors and problems == | + | ==== Updating to the latest Android APIs as of Feb 10th, 2025 ==== |
+ | |||
+ | If you get errors like "Your build is currently configured to use incompatible Java 21.0.4 and Gradle 7.3.3. Cannot sync the project." | ||
+ | |||
+ | * Click the " | ||
+ | |||
+ | But then you'll probably see: | ||
+ | |||
+ | A build operation failed. | ||
+ | Could not create task ': | ||
+ | |||
+ | To fix, edit your build.gradle file and change the part that says: | ||
+ | |||
+ | |||
+ | < | ||
+ | id ' | ||
+ | id ' | ||
+ | </ | ||
+ | to: | ||
+ | |||
+ | < | ||
+ | id ' | ||
+ | id ' | ||
+ | </ | ||
+ | |||
+ | (or whatever the latest versions are, I had to google to find them( | ||
+ | |||
+ | After clicking "try again" I got a new error of " | ||
+ | |||
+ | Then I got " | ||
+ | |||
+ | * Edit build.gradle and change targetSdk to 35. It will ask if you know what you're doing, tell it you do. (lie, in my case) | ||
+ | |||
+ | At this point, it started to compile but got errors like this: | ||
+ | |||
+ | C/ | ||
+ | C/ | ||
+ | |||
+ | If you get this, it means your AndroidGradle\app\src\main\cpp\CMakeLists.txt file is asking that boost .cpps be compiled - you need to remove all that, the updated version of boost we used has NO CPP files, just headers. | ||
+ | |||
+ | (so cut out: ${SHARED}/ | ||
+ | ${SHARED}/ | ||
+ | |||
+ | |||
+ | If you get " | ||
+ | |||
+ | Well, yeah, I guess they changed that. Double click your build.gradle file and it might have an "Open the " | ||
+ | |||
+ | Ok, that didn't fix the namespace error, to fix that, I had to add " | ||
+ | |||
+ | ==== JAVA_HOME missing when running .bat files like BuildAndInstallDebug.bat ==== | ||
+ | |||
+ | To fix this you'll need to know where your java install is and set JAVA_HOME to it. | ||
+ | |||
+ | Easiest thing is to use Android Studio’s bundled JDK, it’s usually located in a directory similar to: | ||
+ | C: | ||
+ | |||
+ | (Your path might be different; check your Android Studio settings under File > Project Structure > SDK Location or File > Settings > Build, Execution, Deployment > Build Tools > Gradle.) | ||
+ | |||
+ | |||
+ | |||
+ | Open a Command Prompt and run: | ||
+ | < | ||
+ | set JAVA_HOME=C: | ||
+ | </ | ||
+ | Then you can run the batch files in the same session and it should work. | ||
+ | |||
+ | Or, to set it permenently: | ||
+ | |||
+ | Right-click on This PC (or My Computer) and select Properties. | ||
+ | Click on Advanced system settings. | ||
+ | In the System Properties window, click on the Advanced tab, then click Environment Variables.... | ||
+ | Under System variables, click New... (or find JAVA_HOME if it already exists and click Edit...). | ||
+ | Set the Variable name to JAVA_HOME and the Variable value to your JDK path (e.g., C: | ||
+ | Click OK to save the changes. | ||
+ | Optionally, add %JAVA_HOME%\bin to your PATH variable if it isn’t already there. | ||
+ | Verify the Setup: | ||
+ | |||
+ | Open a new Command Prompt (to ensure the new environment variables are loaded). | ||
+ | < | ||
+ | echo %JAVA_HOME% | ||
+ | </ | ||
+ | |||
+ | ==== Other Errors and problems ==== | ||
* If you get a weird " | * If you get a weird " | ||
(this is under construction and github may not reflect these latest changes yet) | (this is under construction and github may not reflect these latest changes yet) | ||
proton/android_setupv3.1659334017.txt.gz · Last modified: 2022/08/01 06:06 by seth