- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在编译或代码生成期间收到此错误,我已经设置了 Jetpack Compose 依赖项并对其进行处理,我已经制作了一些 compose 组件并且预览是可见的,但是在编译期间我遇到了这个问题。
我正在使用 Android Studio ArticFox
org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during psi2ir
File being compiled: (154,13) in /Users/vipulthawre/AndroidStudioProjects/tbappCompose/base-question-module/src/main/java/com/testbook/tbapp/base_question/MamcqPracticeHtml.kt
The root cause java.lang.StackOverflowError was thrown at: java.base/java.lang.ClassLoader.defineClass1(Native Method)
null: KtBinaryExpression:
"<style type=\"text/css\"> \n" +
" body {\n" +
" color: #1E2022;\n" +
" margin: 0px;\n" +
" }\n" +
"\n" +
"
并且脚本在该文件中,如下所示
private fun getStyle(): String {
val styleCss =
"<style type=\"text/css\"> \n" + " body {\n" + " color: #1E2022;\n" + " margin: 0px;\n" + " }\n" + "\n" + " .question {\n" + " padding: 16px;\n" + " font-size: 16px;\n" + " border-bottom: 1px solid " + dividerColor + ";\n" + " background: #FFFFFF;\n" + " }\n" + "\n" + " .option {\n" + " padding: 0;\n" + " margin-left:8px; margin-right:8px;\n" + " }\n" + "\n" + " .option li {\n" + " box-sizing: border-box;\n" + " font-size: 16px;\n" + " width: calc(100% - 38px);\n" + " display: table;\n" + " border: 1px solid transparent;\n" + " border-bottom-color: " + dividerColor + ";\n" + " list-style: none;\n" + " padding: 18px;\n" + " margin-top: 5px;\n" + " margin-bottom: 5px;\n" + " border-radius: 2px;\n" + " background: #FFFFFF;\n" + " }\n" + "\n" + " .view-solution-div {\n" + " box-sizing: border-box;\n" + " font-size: 16px;\n" + " width: 100%;\n" + " display: table;\n" + " border: 1px solid transparent;\n" + " border-bottom: 1px solid " + dividerColor + ";\n" + " list-style: none;\n" + " padding: 18px;\n" + " border-radius: 2px;\n" + " background: #FFFFFF;\n" + " }\n" + "\n" + " .solution {\n" + " position: relative;\n" + " padding: 16px;\n" + " border-bottom: 1px solid " + dividerColor + ";\n" + " border-radius: 3px;\n" + " background: #FFFFFF;\n" + " overflow: hidden;\n" + " }\n" + "\n" + " .solution_overlay {\n" + " position: absolute;\n" + " left: 0;\n" + " right: 0;\n" + " top: 0;\n" + " bottom: 0;\n" + " margin: auto;\n" + " background: rgba(255, 255, 255, 0.7);\n" + " text-align: center;\n" + " font-weight: bold;\n" + " color: #222;\n" + " }\n" + "\n" + " .solution_overlay p {\n" + " position: absolute;\n" + " padding: 16px;\n" + " left: 0;\n" + " right: 0;\n" + " margin: 0;\n" + " top: 50% !important;\n" + " -webkit-transform: translate(0, -50%);\n" + " transform: translate(0, -50%);\n" + " }\n" + "\n" + " #solution {\n" + " border-bottom: 1px solid " + dividerColor + ";\n" + " position: relative;\n" + " padding: 8px;\n" + " background: #FFFFFF;\n" + " overflow: hidden;\n" + " margin-top: 16px;\n" + " margin-bottom:20px;" + " }\n" + "\n" + " .blurred {\n" + " text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);\n" + " color: transparent;\n" + " }\n" + "\n" + " .numerical {\n" + " width: 100%;\n" + " padding-top: 30px;\n" + " padding-bottom: 30px;\n" + " margin-bottom: 70px;\n" + " margin-top: 50px;\n" + " border-bottom: 1px solid " + dividerColor + ";\n" + " border-radius: 1px;\n" + " background: #FFFFFF;\n" + " display: table;\n" + " box-sizing: border-box;\n" + " }\n" + "\n" + " #ans_div {\n" + " padding-left: 20px !important;\n" + " }\n" + "\n" + " .numerical input {\n" + " background: #fff;\n" + " border-bottom: 1px solid #A9A9A9;\n" + " font-style: normal !important;\n" + " outline: none !important;\n" + " }\n" + "\n" + " .numerical button {\n" + " background: #fff;\n" + " border: 0px !important;\n" + " }\n" + "\n" + " .numerical input:active, .numerical input:focus {\n" + " border-bottom: 2px solid #1FBAD6 !important;\n" + " }\n" + "\n" + " .wrongNumerical {\n" + " background: #ffe5e5 !important;\n" + " }\n" + "\n" + " .correctNumerical {\n" + " background: #e5ffe5 !important;\n" + " }\n" + "\n" + " .correctOption {\n" + " border-radius: 1px!important;\n" + " background: rgba(139, 213, 139, 0.25)!important;\n" + " border: 1px solid rgba(110, 194, 110, 0.85)!important;\n" + " }\n" + "\n" + " .correctNumerical {\n" + " border-radius: 1px;\n" + " background: rgba(139, 213, 139, 0.25);\n" + " border: 1px solid rgba(110, 194, 110, 0.85);\n" + " }\n" + "\n" + " .markedOption {\n" + " border-radius: 1px !important;\n" + " background: rgba(170, 216, 225, 0.25) !important;\n" + " border: 1px solid rgba(42, 160, 182, 0.85) !important;\n" + " }\n" + "\n" + " .wrongOption {\n" + " border-radius: 1px!important;\n" + " background: rgba(254, 159, 159, 0.25)!important;\n" + " border: 1px solid rgba(231, 67, 67, 0.85)!important;\n" + " }\n" + "\n" + " input[placeholder] {\n" + " font-style: italic;\n" + " }\n" + "\n" + " input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {\n" + " -webkit-appearance: none;\n" + " margin: 0;\n" + " }\n" + "\n" + " p {\n" + " margin: 0;\n" + " padding: 0;\n" + " line-height: 23px;\n" + " font-family: 'roboto';\n" + " font-size: 16px;\n" + " color: #1E2022 !important;\n" + " }\n" + "\n" + " span {\n" + " margin: 0;\n" + " padding: 0;\n" + " line-height: 23px;\n" + " font-family: 'roboto';\n" + " font-size: 16px;\n" + " color: #1E2022 !important;\n" + " }\n" + "\n" + " img {\n" + " max-width: 100% !important;\n" + " height: auto !important;\n" + " }\n" + "\n" + " .MathJax_SVG svg > g, .MathJax_SVG_Display svg > g {\n" + " fill: #1E2022 !important;\n" + " stroke: #1E2022 !important\n" + " }\n" + "\n" + " .switch {\n" + " position: relative;\n" + " display: inline-block;\n" + " width: 35px;\n" + " height: 14px;\n" + " vertical-align: middle;\n" + " margin-left: 10px;\n" + " -webkit-tap-highlight-color: transparent;\n" + " }\n" + "\n" + " .switch input {\n" + " display: none;\n" + " }\n" + "\n" + " .slider {\n" + " position: absolute;\n" + " cursor: pointer;\n" + " top: 0;\n" + " left: 0;\n" + " right: 0;\n" + " bottom: 0;\n" + " background-color: rgba(17, 171, 213, 0.13);\n" + " -webkit-transition: .2s;\n" + " transition: .2s;\n" + " }\n" + "\n" + " .slider:before {\n" + " position: absolute;\n" + " content: \"\";\n" + " height: 20px;\n" + " width: 20px;\n" + " left: -1px;\n" + " bottom: -3px;\n" + " background-color: #A5A8B6;\n" + " -webkit-transition: .2s;\n" + " transition: .2s;\n" + " }\n" + "\n" + " input:focus + .slider {\n" + " box-shadow: 0 0 1px #2196F3;\n" + " }\n" + "\n" + " input:checked + .slider:before {\n" + " -webkit-transform: translateX(15px);\n" + " transform: translateX(15px);\n" + " background-color: #1EB6D2;\n" + " }\n" + "\n" + " /* Rounded sliders */\n" + " .slider.round {\n" + " border-radius: 34px;\n" + " }\n" + "\n" + " .slider.round:before {\n" + " border-radius: 50%;\n" + " }\n" + "\n" + " .missedOption {\n" + " border-radius: 1px!important;\n" + " background: rgba(125, 193, 125, 0.1)!important;\n" + " border: 1.5px dashed rgba(0, 200, 0, 0.85)!important;\n" + " }\n" + "\n" + " .markedOption {\n" + " border-radius: 1px !important;\n" + " background: rgba(170, 216, 225, 0.25) !important;\n" + " border: 1px solid rgba(42, 160, 182, 0.85) !important;\n" + " }\n" + "\n" + " .btn {\n" + " display: inline-block;\n" + " margin: 8px;\n" + " font-weight: 400;\n" + " text-align: center;\n" + " vertical-align: middle;\n" + " touch-action: manipulation;\n" + " cursor: pointer;\n" + " border: 1px solid #000000;\n" + " white-space: nowrap;\n" + " padding: 6px 12px;\n" + " font-size: 14px;\n" + " line-height: 1.42857143;\n" + " border-radius: 0;\n" + " -webkit-user-select: none;\n" + " -moz-user-select: none;\n" + " -ms-user-select: none;\n" + " user-select: none;\n" + " }\n" + " .btn-primary {\n" + " border: 1px solid transparent;\n" + " color: #fff;\n" + " background-color: #1fbad6;\n" + " border-color: #1fbad6;\n" + " border-radius: 4px;\n" + " box-shadow: 1px 1px 3px RGBA(0, 0, 0, 0.2)\n" + " }" + " .multi-info {\n" + " color: #CDCDCD!important;\n" + " font-size: 14px!important;\n" + " }" + " .missed-answer-text {\n" + " position: absolute;\n" + " bottom:0;\n" + " right:0;\n" + " font-size: 8px;\n" + " background-color: #20b24e;\n" + " color: white!important; \n" + " padding-top: 0px;\n" + " padding-bottom: 0px;\n" + " line-height: 16px;\n" + " padding-left: 10px; \n" + " padding-right: 10px; \n" + " } \n" + " .icon-img{\n" + " position: relative;\n" + " float: right;\n" + " clear: both;\n" +
// " top:-10px;\n" +
" }" + "\n" + " </style>"
return styleCss
}
图片:
plugins {
id 'com.android.library'
id 'kotlin-android'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildFeatures {
// Enables Jetpack Compose for this module
compose true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
useIR = true
}
composeOptions {
kotlinCompilerVersion = "1.5.10"
kotlinCompilerExtensionVersion = "1.0.0-beta09"
}
}
dependencies {
implementation project(":resource-module")
implementation project(":constants-module")
implementation project(":prefs-module")
implementation project(":network-module")
implementation project(path: ':models-module')
implementation project(":base-ui-module")
api 'androidx.core:core-ktx:1.5.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
api 'com.google.android.material:material:1.3.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
api("androidx.compose.ui:ui:1.0.0-beta09")
// Tooling support (Previews, etc.)
api("androidx.compose.ui:ui-tooling:1.0.0-beta09")
// Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
api("androidx.compose.foundation:foundation:1.0.0-beta09")
// Material Design
api("androidx.compose.material:material:1.0.0-beta09")
// Material design icons
api("androidx.compose.material:material-icons-core:1.0.0-beta09")
api("androidx.compose.material:material-icons-extended:1.0.0-beta09")
// Integration with observables
api("androidx.compose.runtime:runtime-livedata:1.0.0-beta09")
api("androidx.compose.runtime:runtime-rxjava2:1.0.0-beta09")
api("androidx.compose.compiler:compiler:1.0.0-beta09")
api 'androidx.activity:activity-compose:1.3.0-beta02'
// UI Tests
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.0.0-beta09")
}
最佳答案
我遇到了同样的问题 Invalidate Caches/Restart in Android Studio 对我有用
关于android - 后端内部错误 : Exception during psi2ir in Jetpack compose,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68127246/
这是我的测试用例。 http://tobeythorn.com/isi/dummy2.svg http://tobeythorn.com/isi/isitest.html 如果我自己打开 svg,内部
这是我的测试用例。 http://tobeythorn.com/isi/dummy2.svg http://tobeythorn.com/isi/isitest.html 如果我自己打开 svg,内部
我正在尝试做类似的事情: SELECT SUM( CASE WHEN ( AND EXISTS(SELECT 1
我想问如何在外部 ng-repeat 内部正确使用内部 ng-repeat: 这意味着你想使用这样的东西: {{milestone.id}} {{
我希望在 wordpress 的仪表板内编辑 css 样式并且如果可能的话不必编辑 php 文件。 我知道至少可以编辑一些属性,所以我希望我可以直接在仪表板中编辑所有属性。 更具体地说如何更改自定义类
我在安装在 windows10 上的 vmware 中的 Ubuntu 上安装了伪分布式独立 hadoop 版本。 我从网上下载了一个文件,复制到ubuntu本地目录/lab/data 我在 ubun
我有一个如下所示的 WHERE 语句: WHERE ((@Value1 IS NULL AND [value1_id] IS NULL) OR [value1_id] = ISNULL(@Va
我有一个如下所示的 WHERE 语句: WHERE ((@Value1 IS NULL AND [value1_id] IS NULL) OR [value1_id] = ISNULL(@Va
在我的一些测试帮助程序代码中,我有一个名为 FakeDbSet(Of T) 的 IDbSet(Of T) 实现,它模拟了许多 EF 行为,但没有实际的数据库。我将类声明为 Friend ,因为我想强制
我正在寻找 Cassandra/CQL 的常见 SQL 习语 INSERT INTO ... SELECT ... FROM ... 的表亲。并且一直无法找到任何以编程方式或在 CQL 中执行此类操作
如何防止内部 while 循环无限运行?问题是,如果没有外部 while 循环,内部循环将毫无问题地运行。我知道它必须对外循环执行某些操作,但我无法弄清楚是什么导致了问题。 import java.u
我正在努力学习更多有关 C++ 的知识,但在国际象棋程序中遇到了一些代码,需要帮助才能理解。我有一个 union ,例如: union b_union { Bitboard b; st
这是我项目网页中的代码片段。这里我想显示用户选择的类别,然后想显示属于该类别的主题。在那里,用户可以拥有多个类别,这没有问题。我可以在第一个 while 循环中打印所有这些类别。问题是当我尝试打印主题
我想知道如何在 swing 中显示内部框架。这意味着,当需要 JFrame 时,通常我所做的是, new MyJFrame().setVisible(true); 假设之前的表单也应该显示。当显示这个
我最近发现了一些有趣的行为,这让我想知道对象如何知道存在哪些全局变量。例如,假设我有一个文件“test.py”: globalVar = 1 toDelete = 2 class Test(objec
我知道它已经在这里得到回答: google maps drag and drop objects into google maps from outside the Map ,但这并不完全是我所需要的
我目前正在学习Javascript DOM和innerHTML,发现在理解innerHTML方面存在一些问题。 这是我的代码:http://jsfiddle.net/hphchan/bfjx1w70/
我构建了一个布局如下的库: lib/ private_class_impl.cc private_class_decl.h public_class_impl.cc include/
我有一个使用 bootstrap 3 的组合 wordpress 网站。它基本上是一个图像网格。当屏幕展开时,它会从三列变为四列。移动时它是一列。 我想出了如何调整图像的顶部和底部边距,但我希望图像的
我正在试用 MSP-EXP430G2 的教程程序,使用 Code Composer Studio 使 LED 闪烁。最初,它有一个闪烁的无限循环: for(;;) // This emp
我是一名优秀的程序员,十分优秀!