Closed krauzee closed 4 years ago
Full stacktrace:
android.view.InflateException: Binary XML file line #2: Binary XML file line #2: You must supply a layout_width attribute.
Caused by: java.lang.UnsupportedOperationException: Binary XML file line #2: You must supply a layout_width attribute.
at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:767)
at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:7036)
at android.view.ViewGroup$MarginLayoutParams.
my build.gradle:
android { compileSdkVersion 29 buildToolsVersion "29.0.3"
defaultConfig {
applicationId "myapp"
minSdkVersion 23
targetSdkVersion 29
versionCode 2
versionName "1.0.12"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
debuggable(false)
}
debug {
minifyEnabled false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
packagingOptions {
exclude("META-INF/*.kotlin_module")
}
}
dependencies {
//Aimylogic integration implementation("com.justai.aimybox:google-platform-speechkit:0.14.0") implementation("com.justai.aimybox:core:0.14.0") implementation("com.justai.aimybox:components:0.1.9") }
In the app and activity class, I did everything exactly according to the instructions.
Please provide your Android version
Please provide your Android version
MIUI 11.0.2 Android 7.1.2
Just put these styles in theme.xml file it should work
<style name="CustomAssistantButtonTheme" parent="DefaultAssistantTheme.AssistantButton">
<!-- Customize Assistant button theme here -->
<!-- <item name="aimybox_backgroundColor">@color/primary</item> -->
<!-- <item name="aimybox_recordingAnimationColor">@color/recording</item> -->
<!-- <item name="aimybox_buttonExpandedColor">@color/white</item> -->
</style>
<style name="CustomRecognitionWidgetTheme" parent="DefaultAssistantTheme.Widget.Recognition">
</style>
<style name="CustomResponseWidgetTheme" parent="DefaultAssistantTheme.Widget.Response">
</style>
<style name="CustomButtonReplyWidgetTheme" parent="DefaultAssistantTheme.Widget.ButtonReply">
</style>
<style name="CustomImageReplyWidgetTheme" parent="DefaultAssistantTheme.Widget.ImageReply">
</style>
I added this to my styles.xml
but I still get the error. What am I doing wrong?
youre in better shape than me im compleatly new to this have android studio and dont have a clue on how to get a assisstant app to work lol ive tryied them all this one seems the closest to the one i had but google got rid of it even works with dialogue flo but i cant get it to work im missing something in the instructions on how to do it and every time i try i end up downloading more and more software it went from android studio to github desktop to some thing that starts with z i cant think of the name atm i just want a assisstant app like the one i paid for the one by speaktoit that one was perfect it was eficiant ran everything so useful af plus customizable and funny and its like im going to have to take 8 years of college in order to get it back
@krauzee are you sure you've applied this style in your AndroidManifest?
I solved this problem, thanks
@krauzee did my suggest help you or you've found another solution?
@krauzee did my suggest help you or you've found another solution?
your suggestion helped me, thanks!
When I click on mic button my app is crashing with error: InflateException
: Binary XML file line #2: Binary XML file line #2: You must supply a layout_width attribute. Caused by: java.lang.UnsupportedOperationException: Bin ary XML file line #2: You must supply a layout_width attribute.