How to Add Stacktrace or debug Option when Building Android Studio Project
You can use GUI to add these gradle command line flags from
File > Settings > Build, Execution, Deployment > Compiler
For MacOS user, it's here
Android Studio > Preferences > Build, Execution, Deployment > Compiler
like this (add --stacktrace
or --debug
)
Note that the screenshot is from before 0.8.10, the option is no longer in the Compiler > Gradle
section, it's now in a separate section named Compiler (Gradle-based Android Project)
How to Run with --stacktrace option to get the stack trace
You can try running the assembleDebug
Gradle task manually.
cd android
./gradlew assembleDebug --stacktrace
But there could be something wrong with your configuration.
Run flutter doctor -v
and see if everything is setup correctly.
Otherwise you can try deleting the Gradle cache folder which seem to bet at C:\Users\October Price.gradle\caches
.
Unable to run Flutter Project with Package
For those who came up with the same problem I have. The project I'm working came from Git and I think that project wasn't updated for Android Embedding v2 so I got the first error.
Now in the second error, all I did was to read other's bug fixes (not officially).
- Adding the dependencies and kotlin-version (1.4.20) needed for the main package(audioplayers). C:\flutter\flutter.pub-cache\hosted\pub.dartlang.org\audioplayers-0.17.1\android\
- Making the android project's app build.gradle>defaultConfig>minSdkVersion to 23 (from 16)
- Use pub get and update in pubspec.yaml.
How to run compile debug stacktrace in Android studio
news_center-body_text
This has an error at -
(the arrow is pointing to it).
Your resource names must reflect valid Java variable rules, so no -
characters. Change it to an _
in the ID for that XML element where you have that particular element.
On a related note - How would you expect findViewById(R.id.news_center-body_text)
to work?
That would be your first hint that something is wrong.
Related Topics
Self-Signed Ssl Acceptance on Android
Determine If Android App Is Being Used For the First Time
How to Set Ringtone in Android from My Activity
How to Refresh Mediastore on Android
How to Open the "Front Camera" on the Android Platform
How to Force Use of Overflow Menu on Devices With Menu Button
How to Sign Android App With System Signature
How to Add Calendar Events in Android
Android - Sms Broadcast Receiver
Android and Facebook Share Intent
How to Add a Button Dynamically in Android
Check If Application Is on Its First Run