Comments (12)
You can't access to classes from dependencies of :shared
module in your :android-app
module if you use implementation
configuration in :shared
module.
Try change implementation
to api
.
also kotlin-native-gradle-plugin
is deprecated, now should be used org.jetbrains.kotlin.multiplatform
plugin - https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#setting-up-a-multiplatform-project and moko-resources gradle plugin have integration only with org.jetbrains.kotlin.multiplatform
from moko-resources.
It looks correct. I'll try to reproduce the problem at home
from moko-resources.
i have reproduced the problem. and on sample project invalid language set not always, but in 70% cases...it's strange. after fix i will inform you here
from moko-resources.
@rmdan90 hi! please try to add these code into Info.plist of ios application:
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>es</string>
</array>
from moko-resources.
hi!
Are you trying to run the sample from the repository or implementing it in your project?
I checked the launch of the sample from the sample directory - everything starts correctly.
Can you attach a build.gradle to issue? Or upload project reproducer to github?
from moko-resources.
I'm trying to implement it in my project.
buildscript {
ext.kotlin_version = '1.3.61'
ext.kotlin_native_version = '1.3.41'
ext.ktor_version='1.2.6'
ext.coroutines_version='1.3.2'
ext.kotlinx_coroutines_version='1.3.2'
ext.serialization_version = '0.14.0'
ext.localization_version = '0.6.0'
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
maven { url 'https://dl.bintray.com/jetbrains/kotlin-native-dependencies' }
maven { url 'https://dl.bintray.com/kotlin/ktor' }
maven { url "https://kotlin.bintray.com/kotlinx" }
maven { url = "https://dl.bintray.com/icerockdev/plugins" }
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:$kotlin_native_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath "dev.icerock.moko:resources-generator:$localization_version"
}
And the shared build.gradle
commonMain.dependencies {
api 'org.jetbrains.kotlin:kotlin-stdlib-common'
implementation "io.ktor:ktor-client-core:$ktor_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$serialization_version"
implementation "ch.qos.logback:logback-classic:1.2.3"
implementation "io.ktor:ktor-client-logging:$ktor_version"
implementation "dev.icerock.moko:resources:$localization_version"
}
` object StringUtils {
fun getMyString(): StringDesc {
return StringDesc.Resource(MR.strings.success)
}
} `
Android call
Log.d("testLocalized", getMyString().toString(this))
from moko-resources.
It works fine now on android in both English and spanish.
But on iOS simulator it always display the english message, Are there any configurations i'm missing?
from moko-resources.
Can you show your MR directory structure?
And can you do small sample with reproduction of problem?
from moko-resources.
from moko-resources.
@DevTchernov it's strange behavior of iOS side, your attention needed
from moko-resources.
It works like a charm now.
@Alex009 Thank you.
from moko-resources.
info added to readme
from moko-resources.
Related Issues (20)
- Function 'stringResource' can not be called: No function found for symbol HOT 5
- Slow build time HOT 4
- 0.24.0-beta-2 incorrectly translates strings with `&` for Android as just `&` HOT 4
- 0.24.0-beta-2 includes file extension in `files` and `assets` in the resource name HOT 1
- Apostrophe incorrectly displayed on iOS HOT 3
- 0.24.0-beta-03 includes removed strings and fails to build HOT 3
- 0.24.0-beta-3 incorrectly escapes unicode character sequences in iOS strings file HOT 2
- Add observable to StringDesc.localeType
- 0.24.0-beta-03 When compiled on windows, android assets use \ instead of / for folder paths HOT 1
- Cannot change attributes of dependency configuration ':xxx:iosX64CInteropApiElements' after it has been resolved HOT 11
- Resolving dependency configuration 'metadataCompilationApi' is not allowed as it is defined as 'canBeResolved=false' HOT 1
- Load image as plain resource by string on iOS
- Slow loading of string resource at first open of screen HOT 6
- Suggested improvements to CopyFrameworkResourcesToAppTask HOT 1
- 0.24.0-beta-4 incorrectly handles plurals with `"` character; displays as `\"` on iOS and doesn't display on Android. HOT 2
- Font caching Issue for ios HOT 7
- Crash when using MR.strings() in unit tests iOS HOT 9
- Are there plans to support linuxX64? HOT 1
- Remove unnecessary dependency HOT 1
- How do I get the text value on JVM? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moko-resources.