Skip to main content
Troubleshooting

Repository SSL not applied

사용한 Gradle 버전: 7.2

repositories {
    maven {
        url repo.ons
    }
}

Less than 1 minuteGradleTroubleshootinggradlegroovyideaintellij-ideaintellijinsecure-protocolshttps
Gradle Snippets

A. assembleRelease Task를 위한 signingConfigs 최소구성

title description
목적 Signing처리 된 Android APK 생성 (
적업대상 gradle 파일 ./<최종 Android모듈>/build.gradle

Less than 1 minuteAndroidGradle Snippetsgradlegroovyandroidandroid-studioideaintellij-ideaintellijapksigned-configplugin-android
Jetpack Compose Snippets

Selectable Component

MainActivity.kt

class MainActivity: ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            ColorPicker()
        }
    }
}

@Composable
fun ColorPicker() {
    val colors = listOf(
        Color(0xfff9a825),
        COlor(0xffff3d00),
        Color(0xff4caf50),
        Color(0xff9c27b0),
        Color(0xff2196f3))
    val currentColor = remember { mutableStateOf(colors[0]) }

    Column(
        horizontalAlignment = Alignment.CenterHorizontally,
        verticalArrangement = Arragement.Center,
        modifier = Modifier.fillMaxSize()
    ) {
        Row {
            colors.forEach { color -> 
                val isSelected = currentColor.value == color
                Box (
                    modifier = Modifier.padding(4.dp)
                                .size(50.dp)
                                .clip(CircleShape)
                                .background(color)
                                .selectable(
                                    selected = isSelected,
                                    onClick = { currentColor.value = color }
                                )
                ) {
                    if (currentColor.value == color) {
                        Icon(imageVector = Icons.Filled.Done,
                            contentDescription = "Done",
                            tint = Color.White
                            modifier = Modifier.align(Alignment.Center))
                    }
                }
            }
        }

        Text (
            text = "TEXT",
            color = currentColor.value,
            fontSize = 27.sp
        )
    }
}

Less than 1 minuteAndroidJetpack Composektktsandroidandroid-studioideaintellij-ideaintellij
Kotlin Snippets

String

import android.util.Patterns

/**
 * [String.isValidEmail()]
 * Check for a Valid Email address
 * 
 * @return whether the input is valid for email address
 */
fun String.isValidEmail(): Boolean {
    val pattern = Patterns.EMAIL_ADDRESS
    val isEmail = pattern.matcher(this).matches()
    return this.isNotEmpty() && isEmail
}

About 1 minAndroidKotlin Snippetsktktsandroidandroid-studioideaintellij-ideaintellij
Gradle Snippets


Less than 1 minuteJavaKotlinSpringGradleSnippetsgradlegroovyspringspringbootideaintellij-ideaintellijplugin-android
Snippets

Maven



Less than 1 minuteMavenSnippetsmavenapache-mavensnippetsjdkjdk8jdk11mvnideaintellij-ideaintellijideeclipse
Youtube


Less than 1 minuteMavenYoutubemavenapache-mavensnippetsjdkjdk8jdk11mvnideaintellij-ideaintellijideeclipse