Anyone W/ Any Experience Using Android Studio?

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
I was trying to make an apk last night, but I have no idea if I'm even doing it correctly. I don't know if it's looking in the correct location for dependencies, if you need say include and lib folders like VS. do I need to compile these dependencies first? there's no mention of this in the instructions, so it's confusing knowing what it's trying to have me do. also, it mentions symlinks, which I know how to make, but there's no mention of symlinks to what? this is for building the android version of sonic mania btw.
 

m00k00

Well-Known Member
Member
Joined
Sep 16, 2015
Messages
128
Trophies
0
Age
52
XP
1,192
Country
Gambia, The
Most of the Time APKs are build using Gradle. Do you have any files like build.gradle, gradle.properties, gradlew or settings.gradle in the Project's Main Directory? Android Studio should automatically use the Gradle Build Scripts if they are present in the Project's Main Directory.
 
  • Like
Reactions: godreborn

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
yes, but the apk came out corrupted. it showed the right icon, but the apk was too small. I don't know the difference between build project and build apk either.
 

m00k00

Well-Known Member
Member
Joined
Sep 16, 2015
Messages
128
Trophies
0
Age
52
XP
1,192
Country
Gambia, The
Code:
gradle tasks
should list all potential build targets. If you say: the APK is corrupted I can only try to guess what went wrong. Is there anything strange in the Log Files? What Beginners usually miss is: Even if you've build the APK successfully you'd need to sign it, otherwise you cannot install it (under usual circumstances). Here's a Document that should get you started: https://developer.android.com/studio/publish/app-signing.html
 
  • Like
Reactions: godreborn

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
Code:
gradle tasks
should list all potential build targets. If you say: the APK is corrupted I can only try to guess what went wrong. Is there anything strange in the Log Files? What Beginners usually miss is: Even if you've build the APK successfully you'd need to sign it, otherwise you cannot install it (under usual circumstances). Here's a Document that should get you started: https://developer.android.com/studio/publish/app-signing.html
is gradle tasks under the list of files to the left if you were to right click? or is it among the toolbar under file or something?
 

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
I got android sdk and Java installed on Linux. I was able to build sm64, and it works no problem. However, I still don't understand what's happening with sonic mania. I made some symlinks to game and rsdkv5, but I don't think that's the problem. Something is wrong with the gradle I think.
 

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
do you happen to have any log outputs from the gradle build process?
I do not. I'd have to try building it again. Where would this log be in Linux? Android sdk folder? It says success, but it's obviously not right. I have the same problem with both Linux and windows.
 

m00k00

Well-Known Member
Member
Joined
Sep 16, 2015
Messages
128
Trophies
0
Age
52
XP
1,192
Country
Gambia, The
Bash:
./gradlew build > gradle.log

Should do the trick. Afterwards the Log File should be in the same directory.

Bash:
cat gradle.log

should display the content :)
 
  • Like
Reactions: godreborn

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
Alright, thanks. I'll post this in about an hour. Been up all night, but it's too late to go to bed now. Had a doctor's appointment today, and this usually happens, so I'm a bit muddled due to lack of sleep. ;) Have you tried compiling sonic mania for Android? It's the only version that I can't figure out.
 

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
Bash:
./gradlew build > gradle.log

Should do the trick. Afterwards the Log File should be in the same directory.

Bash:
cat gradle.log

should display the content :)
Code:
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:checkDebugAarMetadata UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:mapDebugSourceSetPaths UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :app:processDebugMainManifest UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:processDebugManifestForPackage UP-TO-DATE
> Task :app:processDebugResources UP-TO-DATE
> Task :app:compileDebugJavaWithJavac UP-TO-DATE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders NO-SOURCE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets UP-TO-DATE
> Task :app:compressDebugAssets UP-TO-DATE
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:mergeDebugJavaResource UP-TO-DATE
> Task :app:checkDebugDuplicateClasses UP-TO-DATE
> Task :app:dexBuilderDebug UP-TO-DATE
> Task :app:desugarDebugFileDependencies UP-TO-DATE
> Task :app:mergeExtDexDebug UP-TO-DATE
> Task :app:mergeDexDebug UP-TO-DATE
> Task :app:configureCMakeDebug[arm64-v8a]
> Task :app:buildCMakeDebug[arm64-v8a]
> Task :app:configureCMakeDebug[armeabi-v7a]
> Task :app:buildCMakeDebug[armeabi-v7a]
> Task :app:configureCMakeDebug[x86]
> Task :app:buildCMakeDebug[x86]
> Task :app:configureCMakeDebug[x86_64]
> Task :app:buildCMakeDebug[x86_64]
> Task :app:externalNativeBuildDebug
> Task :app:mergeDebugJniLibFolders UP-TO-DATE
> Task :app:mergeDebugNativeLibs NO-SOURCE
> Task :app:stripDebugDebugSymbols NO-SOURCE
> Task :app:validateSigningDebug UP-TO-DATE
> Task :app:writeDebugAppMetadata UP-TO-DATE
> Task :app:writeDebugSigningConfigVersions UP-TO-DATE
> Task :app:packageDebug UP-TO-DATE
> Task :app:createDebugApkListingFileRedirect UP-TO-DATE
> Task :app:assembleDebug UP-TO-DATE
> Task :app:preReleaseBuild UP-TO-DATE
> Task :app:compileReleaseAidl NO-SOURCE
> Task :app:compileReleaseRenderscript NO-SOURCE
> Task :app:generateReleaseBuildConfig UP-TO-DATE
> Task :app:javaPreCompileRelease UP-TO-DATE
> Task :app:checkReleaseAarMetadata UP-TO-DATE
> Task :app:generateReleaseResValues UP-TO-DATE
> Task :app:generateReleaseResources UP-TO-DATE
> Task :app:mergeReleaseResources UP-TO-DATE
> Task :app:mapReleaseSourceSetPaths UP-TO-DATE
> Task :app:createReleaseCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksRelease UP-TO-DATE
> Task :app:processReleaseMainManifest UP-TO-DATE
> Task :app:processReleaseManifest UP-TO-DATE
> Task :app:processReleaseManifestForPackage UP-TO-DATE
> Task :app:processReleaseResources UP-TO-DATE
> Task :app:compileReleaseJavaWithJavac UP-TO-DATE
> Task :app:extractProguardFiles UP-TO-DATE
> Task :app:lintVitalAnalyzeRelease UP-TO-DATE
> Task :app:lintVitalReportRelease UP-TO-DATE
> Task :app:lintVitalRelease SKIPPED
> Task :app:configureCMakeRelWithDebInfo[arm64-v8a]
> Task :app:buildCMakeRelWithDebInfo[arm64-v8a]
> Task :app:configureCMakeRelWithDebInfo[armeabi-v7a]
> Task :app:buildCMakeRelWithDebInfo[armeabi-v7a]
> Task :app:configureCMakeRelWithDebInfo[x86]
> Task :app:buildCMakeRelWithDebInfo[x86]
> Task :app:configureCMakeRelWithDebInfo[x86_64]
> Task :app:buildCMakeRelWithDebInfo[x86_64]
> Task :app:externalNativeBuildRelease
> Task :app:mergeReleaseJniLibFolders UP-TO-DATE
> Task :app:mergeReleaseNativeLibs NO-SOURCE
> Task :app:stripReleaseDebugSymbols NO-SOURCE
> Task :app:extractReleaseNativeSymbolTables NO-SOURCE
> Task :app:mergeReleaseNativeDebugMetadata NO-SOURCE
> Task :app:checkReleaseDuplicateClasses UP-TO-DATE
> Task :app:dexBuilderRelease UP-TO-DATE
> Task :app:desugarReleaseFileDependencies UP-TO-DATE
> Task :app:mergeExtDexRelease UP-TO-DATE
> Task :app:mergeDexRelease UP-TO-DATE
> Task :app:mergeReleaseArtProfile UP-TO-DATE
> Task :app:compileReleaseArtProfile UP-TO-DATE
> Task :app:mergeReleaseShaders UP-TO-DATE
> Task :app:compileReleaseShaders NO-SOURCE
> Task :app:generateReleaseAssets UP-TO-DATE
> Task :app:mergeReleaseAssets UP-TO-DATE
> Task :app:compressReleaseAssets UP-TO-DATE
> Task :app:processReleaseJavaRes NO-SOURCE
> Task :app:mergeReleaseJavaResource UP-TO-DATE
> Task :app:optimizeReleaseResources UP-TO-DATE
> Task :app:collectReleaseDependencies UP-TO-DATE
> Task :app:sdkReleaseDependencyData UP-TO-DATE
> Task :app:writeReleaseAppMetadata UP-TO-DATE
> Task :app:writeReleaseSigningConfigVersions UP-TO-DATE
> Task :app:packageRelease UP-TO-DATE
> Task :app:createReleaseApkListingFileRedirect UP-TO-DATE
> Task :app:assembleRelease UP-TO-DATE
> Task :app:assemble UP-TO-DATE
> Task :app:bundleDebugClassesToCompileJar UP-TO-DATE
> Task :app:preDebugAndroidTestBuild SKIPPED
> Task :app:processDebugAndroidTestManifest UP-TO-DATE
> Task :app:compileDebugAndroidTestRenderscript NO-SOURCE
> Task :app:generateDebugAndroidTestResValues UP-TO-DATE
> Task :app:lintAnalyzeDebug UP-TO-DATE
> Task :app:lintReportDebug UP-TO-DATE
> Task :app:lintDebug
> Task :app:lint
> Task :app:bundleDebugClassesToRuntimeJar UP-TO-DATE
> Task :app:preDebugUnitTestBuild UP-TO-DATE
> Task :app:javaPreCompileDebugUnitTest UP-TO-DATE
> Task :app:compileDebugUnitTestJavaWithJavac NO-SOURCE
> Task :app:processDebugUnitTestJavaRes NO-SOURCE
> Task :app:testDebugUnitTest NO-SOURCE
> Task :app:bundleReleaseClassesToRuntimeJar UP-TO-DATE
> Task :app:bundleReleaseClassesToCompileJar UP-TO-DATE
> Task :app:preReleaseUnitTestBuild UP-TO-DATE
> Task :app:javaPreCompileReleaseUnitTest UP-TO-DATE
> Task :app:compileReleaseUnitTestJavaWithJavac NO-SOURCE
> Task :app:processReleaseUnitTestJavaRes NO-SOURCE
> Task :app:testReleaseUnitTest NO-SOURCE
> Task :app:test UP-TO-DATE
> Task :app:check
> Task :app:build

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 1s
92 actionable tasks: 19 executed, 73 up-to-date
 

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
Alright, I upgraded my gradle using sdk from 4.4.1 to 7.2.1, which I think is what was used in building sonic mania. No improvement. I know the apk should be around 13MBs, but mine is 3-5MBs. And do you know if JAVA_HOME must have a path? Could Java be the problem?
 

m00k00

Well-Known Member
Member
Joined
Sep 16, 2015
Messages
128
Trophies
0
Age
52
XP
1,192
Country
Gambia, The
Alright, let's first make sure you fulfilled the minimal Requirements:

Inside the Folder where you cloned the Repo to try:

Bash:
ls -lsa android/app/jni

inside you should have these 2 Folders as Symlinks:

  • RSDKv5 -> which points to the Root Directory of the RSDKv5 Repository
  • Game -> which points to the Root Directory of the Sonic Mania repository

to verify this worked try:

Bash:
ls -lsa android/app/jni/RSDKv5/
Bash:
readlink -f android/app/jni/RSDKv5/

and

Bash:
ls -lsa android/app/jni/Game/
Bash:
readlink -f android/app/jni/Game/

Both should return a list of Files and Directories and the Destination of the Symlinks you created.

Next make sure that you've installed the Dependencies:


Then make sure that you've compiled the Shaders according to this Readme File: https://github.com/Rubberduckycooly/RSDKv5-Decompilation/blob/master/RSDKv5/Shaders/README.md

The Developers of Sonic Mania actually recommend that you use Android Studio to build the Project. Install Android Studio and open the Folder android/ in the Root Directory of your Repo as a Project. Android Studio should now ask you to install NDK and probably a few other Packages. Just do whatever Android Studio asks for and then use the Menu to trigger the Build Process.

Good luck!
 

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
Alright, let's first make sure you fulfilled the minimal Requirements:

Inside the Folder where you cloned the Repo to try:

Bash:
ls -lsa android/app/jni

inside you should have these 2 Folders as Symlinks:

  • RSDKv5 -> which points to the Root Directory of the RSDKv5 Repository
  • Game -> which points to the Root Directory of the Sonic Mania repository

to verify this worked try:

Bash:
ls -lsa android/app/jni/RSDKv5/
Bash:
readlink -f android/app/jni/RSDKv5/

and

Bash:
ls -lsa android/app/jni/Game/
Bash:
readlink -f android/app/jni/Game/

Both should return a list of Files and Directories and the Destination of the Symlinks you created.

Next make sure that you've installed the Dependencies:


Then make sure that you've compiled the Shaders according to this Readme File: https://github.com/Rubberduckycooly/RSDKv5-Decompilation/blob/master/RSDKv5/Shaders/README.md

The Developers of Sonic Mania actually recommend that you use Android Studio to build the Project. Install Android Studio and open the Folder android/ in the Root Directory of your Repo as a Project. Android Studio should now ask you to install NDK and probably a few other Packages. Just do whatever Android Studio asks for and then use the Menu to trigger the Build Process.

Good luck!
do I need to put SonicMania folder from the main repo, delete Game from the root, then rename the SonicMania folder to Game? that's how it works with some others iirc. and, isn't ls a command for linux? I know about mklink /D as I've used mklink before, and it will create a file that says symlink. is that what you mean?
 

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
alright, I got it to where it compiles, but I don't understand the shaders portion. I got a black screen on my phone.
 

m00k00

Well-Known Member
Member
Joined
Sep 16, 2015
Messages
128
Trophies
0
Age
52
XP
1,192
Country
Gambia, The
Honestly, I could swear that you said you are building on Linux :D

About the Shaders, maybe this helps: https://github.com/Rubberduckycooly/RSDKv5-Decompilation/issues/34#issuecomment-1222645136

The Problem might also be that your Hardware isn't supported:

Known working:
  • Snapdragon CPUs
  • Mediatek Helio

Known NOT working:
  • Mali
  • Exynos
  • Unisocs
  • Cortex

Found this Information here: https://github.com/Rubberduckycooly/RSDKv5-Decompilation/issues/8

I'm optismtic that you'll make it soon ... seems like you are almost there already ;)
 

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
Honestly, I could swear that you said you are building on Linux :D

About the Shaders, maybe this helps: https://github.com/Rubberduckycooly/RSDKv5-Decompilation/issues/34#issuecomment-1222645136

The Problem might also be that your Hardware isn't supported:



Found this Information here: https://github.com/Rubberduckycooly/RSDKv5-Decompilation/issues/8

I'm optismtic that you'll make it soon ... seems like you are almost there already ;)
I was, but you mentioned android studio, which seems to be for windows. I can build it in there, but there's a problem with shaders. I built the fso's of all of them, just don't know where they're supposed to go in the project.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    cearp @ cearp: HBD 2U