Closed flashag closed 5 months ago
That's odd, i just using it today and it just work. Can you download this example and try if it showing in android export:
https://github.com/kyoz/godot-native-rating/tree/main/example/godot_4
I tried it but no luck. Even iOS doesn't show the plugin in the preset. But I've noticed there is no android folder in the example.
Yup, you have to install Android Build Template
your self, then there will be android/plugins
folder for you to copy this plugin to.
Also don't forget to check this in export window:
When ever you change godot version, you have to delete the android folder and Install Android Build Template
over again.
The same with this example project :( It works for iOS but Android.
Here is the video:
https://github.com/kyoz/godot-native-rating/assets/6623349/3b33519c-1eb2-42a3-9b87-65366d5d0458
I just try it. It work as it should. Are you sure you downloaded the correct version for the plugin. You should download android-template-4.1.zip
If it still not work, you should try delete android folder, run Project -> Install Android Build Template...
. Then copy the plugin again.
It just isn't working. I did what you said - no luck. I deleted Android preset and created new one - same. I tried to rename folder as "Rating", "rating", leave it as is - doesn't work. Changed renderer from Compatibility to Mobile - same.
I don't know what else it can be!
I have Godot version 4.1.1
You don't have to create a folder for the plugin or change compatibility mode, just paste extracted content of the plugin directly in android/plugins
folder.
Here is a exactly build for 4.1.1. android-template-4.1.1.zip
Yeah I know. I mean it can be anything so I tried all the stuff but nothing helped. I tried build for 4.1.1 but nothing changes. Can you please show me your build.gradle may be that's the problem.
Just an example: I added another plugin files to android/plugins
and the plugin immediately appeared in export preset
I though it was Godot version is error so i tried to install Godot 4.1.1 and the plugin still work normally (Tried with the example i send you before).
I don't think it's by build.gradle
but here is it.
// Gradle build config for Godot Engine's Android port.
buildscript {
apply from: 'config.gradle'
repositories {
google()
mavenCentral()
}
dependencies {
classpath libraries.androidGradlePlugin
classpath libraries.kotlinGradlePlugin
}
}
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
apply from: 'config.gradle'
allprojects {
repositories {
google()
mavenCentral()
// Godot user plugins custom maven repos
String[] mavenRepos = getGodotPluginsMavenRepos()
if (mavenRepos != null && mavenRepos.size() > 0) {
for (String repoUrl : mavenRepos) {
maven {
url repoUrl
}
}
}
}
}
configurations {
// Initializes a placeholder for the devImplementation dependency configuration.
devImplementation {}
}
dependencies {
implementation libraries.kotlinStdLib
implementation libraries.androidxFragment
if (rootProject.findProject(":lib")) {
implementation project(":lib")
} else if (rootProject.findProject(":godot:lib")) {
implementation project(":godot:lib")
} else {
// Godot gradle build mode. In this scenario this project is the only one around and the Godot
// library is available through the pre-generated godot-lib.*.aar android archive files.
debugImplementation fileTree(dir: 'libs/debug', include: ['*.jar', '*.aar'])
devImplementation fileTree(dir: 'libs/dev', include: ['*.jar', '*.aar'])
releaseImplementation fileTree(dir: 'libs/release', include: ['*.jar', '*.aar'])
}
// Godot user plugins remote dependencies
String[] remoteDeps = getGodotPluginsRemoteBinaries()
if (remoteDeps != null && remoteDeps.size() > 0) {
for (String dep : remoteDeps) {
implementation dep
}
}
// Godot user plugins local dependencies
String[] pluginsBinaries = getGodotPluginsLocalBinaries()
if (pluginsBinaries != null && pluginsBinaries.size() > 0) {
implementation files(pluginsBinaries)
}
}
android {
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools
ndkVersion versions.ndkVersion
compileOptions {
sourceCompatibility versions.javaVersion
targetCompatibility versions.javaVersion
}
kotlinOptions {
jvmTarget = versions.javaVersion
}
assetPacks = [":assetPacks:installTime"]
defaultConfig {
// The default ignore pattern for the 'assets' directory includes hidden files and directories which are used by Godot projects.
aaptOptions {
ignoreAssetsPattern "!.svn:!.git:!.gitignore:!.ds_store:!*.scc:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"
}
ndk {
String[] export_abi_list = getExportEnabledABIs()
abiFilters export_abi_list
}
manifestPlaceholders = [godotEditorVersion: getGodotEditorVersion()]
// Feel free to modify the application id to your own.
applicationId getExportPackageName()
versionCode getExportVersionCode()
versionName getExportVersionName()
minSdkVersion getExportMinSdkVersion()
targetSdkVersion getExportTargetSdkVersion()
missingDimensionStrategy 'products', 'template'
}
lintOptions {
abortOnError false
disable 'MissingTranslation', 'UnusedResources'
}
ndkVersion versions.ndkVersion
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
// 'doNotStrip' is enabled for development within Android Studio
if (shouldNotStrip()) {
doNotStrip '**/*.so'
}
}
signingConfigs {
debug {
if (hasCustomDebugKeystore()) {
storeFile new File(getDebugKeystoreFile())
storePassword getDebugKeystorePassword()
keyAlias getDebugKeyAlias()
keyPassword getDebugKeystorePassword()
}
}
release {
File keystoreFile = new File(getReleaseKeystoreFile())
if (keystoreFile.isFile()) {
storeFile keystoreFile
storePassword getReleaseKeystorePassword()
keyAlias getReleaseKeyAlias()
keyPassword getReleaseKeystorePassword()
}
}
}
buildTypes {
debug {
// Signing and zip-aligning are skipped for prebuilt builds, but
// performed for Godot gradle builds.
zipAlignEnabled shouldZipAlign()
if (shouldSign()) {
signingConfig signingConfigs.debug
} else {
signingConfig null
}
}
dev {
initWith debug
// Signing and zip-aligning are skipped for prebuilt builds, but
// performed for Godot gradle builds.
zipAlignEnabled shouldZipAlign()
if (shouldSign()) {
signingConfig signingConfigs.debug
} else {
signingConfig null
}
}
release {
// Signing and zip-aligning are skipped for prebuilt builds, but
// performed for Godot gradle builds.
zipAlignEnabled shouldZipAlign()
if (shouldSign()) {
signingConfig signingConfigs.release
} else {
signingConfig null
}
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
aidl.srcDirs = ['aidl']
assets.srcDirs = ['assets']
}
debug.jniLibs.srcDirs = ['libs/debug', 'libs/debug/vulkan_validation_layers']
dev.jniLibs.srcDirs = ['libs/dev']
release.jniLibs.srcDirs = ['libs/release']
}
applicationVariants.all { variant ->
variant.outputs.all { output ->
output.outputFileName = "android_${variant.name}.apk"
}
}
}
task copyAndRenameDebugApk(type: Copy) {
from "$buildDir/outputs/apk/debug/android_debug.apk"
into getExportPath()
rename "android_debug.apk", getExportFilename()
}
task copyAndRenameDevApk(type: Copy) {
from "$buildDir/outputs/apk/dev/android_dev.apk"
into getExportPath()
rename "android_dev.apk", getExportFilename()
}
task copyAndRenameReleaseApk(type: Copy) {
from "$buildDir/outputs/apk/release/android_release.apk"
into getExportPath()
rename "android_release.apk", getExportFilename()
}
task copyAndRenameDebugAab(type: Copy) {
from "$buildDir/outputs/bundle/debug/build-debug.aab"
into getExportPath()
rename "build-debug.aab", getExportFilename()
}
task copyAndRenameDevAab(type: Copy) {
from "$buildDir/outputs/bundle/dev/build-dev.aab"
into getExportPath()
rename "build-dev.aab", getExportFilename()
}
task copyAndRenameReleaseAab(type: Copy) {
from "$buildDir/outputs/bundle/release/build-release.aab"
into getExportPath()
rename "build-release.aab", getExportFilename()
}
Can you send me the full directory path where your project folder is? Sometime that maybe cause the problem.
my project is here: /Users/user/Documents/Godot projects/Game Folder
and your example project here: /Users/user/Downloads/Example
Unfortunately, i still can't reprocedure your problem.Tried on all of my pc, laptop with various of Godot version but still doesn't face that issue. Are you tried other godot versions?
I will try, thanks! It's really weird because other plugins work just like that. Can you please show me what the whole path to the plugin looks like in your case? Do you rename the extracted folder or something?
That's why i told it really weird. Here is my full path:
/Users/kyoz/Documents/Github/godot-plugins/godot-native-rating/example/godot_4/android/plugins
First i think maybe space
in path may cause the problem, but as you showed, your example are in:
/Users/user/Downloads/Example
So it may not because of space. I'v used like every godot plugins in the github but i've never faced something like that @@.
Is there ary error in the Output when you restart Godot?
Ok, I admit I'm stupid enough. I finally solved it. When you extract the archive it gives you a folder, so I put the folder inside plugins
folder, even though I should have put only files from extracted folder inside plugins
folder. Just like you showed it.
Thank you once again! You have useful plugins, I'll def test them all!
P.S what do you think about a plugin for some analytics like Firebase but for Godot 4?
No problem, bro. For analytics, because of something happen with google policy in the past which is very confused (for both dev and user), so i no longer using that. I just using Admob metric.
And of course, the main reason is that the SDK have some gap. Mean, when you using several plugins (like admob, firebase...etc.) It can cause conflict and will unable to build.
I'm still watching for it. I'll rewrite and maintain as much as Godot plugin as i can.
Awesome!
Godot version
4.1
Plugin version
v1.0.1
Phone information
Xiaomi 9T
Issue description
First thank you for the plugin but I didn't have a chance to test it.
I copied files from zip to your_project/android/plugins but no plugin appeared. Although iOS plugin showed up.
Should I copy something else?
Steps to reproduce
Additional context
No response