I haven't see since when, but my palette doesn't show up, I did some search about it, they say: "Restart the project", but I don't know why when I go in View >> Tool Windows, palette is disabled:
I did a update too, to see if it appeared but it didn't.
Logcat say:
0 warnings.
0 errors.
Console:
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
AGPBI: {"kind":"ERROR","text":"Resource id cannot be an empty string (at \u0027id\u0027 with value \u0027#+id/\u0027).","sourcePath":"C:\\Users\\...\\AndroidStudioProjects\\Solutis\\app\\src\\main\\res\\layout\\activity_contact.xml","position":{"startLine":7,"startColumn":17,"startOffset":308,"endColumn":22,"endOffset":313},"original":""}
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\...\AppData\Local\Android\Sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I found a lot of post with this problem, and i found why, the palette is not disabled, it's activated but it's hidden here:
So you juste have to stretch it
You can restore your layout to default by navigating to Window/Restore Default Layout:
I came up with the same problem. And after going through a lot of trouble, I could fix it with Window -> Restore Default Layout (Shift+F12). It made the palette and the component tree visible again.
Related
How can I make the back button work in android the same way as home. If I click on back, the application is killed, but I need the back button to work the same way as home, that is, just hide the application with the state saved. I know that it is possible to track the pressing of the back button using the WillPopScope widget in the onWillPop method, but how can I make the application collapse?
I found the system_shortcuts package, but it is already outdated and does not support null safety for my project.
Problem with system_shortcuts:
i just add in pubspec system_shortcuts: ^1.0.0 and in my dart file import 'package:system_shortcuts/system_shortcuts.dart';
console:
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
package:system_shortcuts
For solutions, see https://dart.dev/go/unsound-null-safety
3
FAILURE: Build failed with an exception.
Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1102
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
For my purpose I found package move_to_background, and use MoveToBackground.moveTaskToBack();
You can run the app with system_shortcuts package by the below command
flutter run --no-sound-null-safety
OR
if you want to keep your app on null safety then you can use intent package for navigating to home like android home button.
system_shortcuts package's home navigation code is
private void home() {
this.activity.startActivity(new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME));
}
You can call this java code by intent package like below.
Intent()
..setAction(Action.ACTION_MAIN)
..addCategory("android.intent.category.HOME")
..startActivity().catchError((e) => print(e));
OR
You can do it by flutter methodChannel
I am going to use liquid swipe package for my android app. ( https://github.com/Cuberto/liquid-swipe-android ).
So I did every thing step by step according to the it's manual.
I have generated my account key and token from my github account and added gpr.user and gpr.key then added dependencies. but when I built my app I will get this error message.
"Username must not be null!"
Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not resolve com.cuberto:liquid-swipe:1.0.0.
Required by:
project :app
> Could not resolve com.cuberto:liquid-swipe:1.0.0.
> Could not get resource 'https://maven.pkg.github.com/Cuberto/liquid-swipe-android/com/cuberto/liquid-swipe/1.0.0/liquid-swipe-1.0.0.pom'.
> Username must not be null!
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
my github.properties:
gpr.user = user
gpr.key = key
Best regards
https://api.github.com/users/<github username>
Run the above on your browser. This will return a json. In that json, you will see an id, that's your gpr user
For the token, go to developer setting in your github and create a token.
Note: Make sure to tick read packages
Error:(51) Error parsing XML: no element found
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\tariq ziad\AppData\Local\Android\Sdk\build-tools\24.0.0\aapt.exe'' finished with non-zero exit value 1
in my content main file, there is an error showing, "unexpected end of file" last thing is a button. I dont know whats missing? Please someone check it out.
It's general problem to me also. It happens when the external device is not able to update your app when you run the app. Try uninstalling the installed app and install again. If problem persist please provide full logcat result.
This question already has answers here:
How to Add Stacktrace or debug Option when Building Android Studio Project
(13 answers)
Closed 6 years ago.
Anyone knows how to debug in Android studio?
My program couldn't run due to an exception,
app:compilejavac.
And it says use debug or stacktrace for more info. Please help me out. All other apps running fine only current project has this errors.
The error message is that :
The error is that: /Users/hexinhao/AndroidStudioProjects/zhbj77/app/build/generated/source/r/debug/com/jikexueyuan/zhbj75/R.java:2431: 错误: 需要';'
public static final int news_center-body_text=0x7f0c0089;
^
/Users/hexinhao/AndroidStudioProjects/zhbj77/app/build/generated/source/r/debug/com/jikexueyuan/zhbj75/R.java:2431: 错误: 需要<标识符>
public static final int news_center-body_text=0x7f0c0089;
^
2 个错误
:app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output
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.
I am attempting to install the sample app here: https://github.com/brentvatne/react-native-scrollable-tab-view
After install, I attempt to run, but the error appears:
:react-native-vector-icons:processReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-vector-icons:processReleaseResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.E
xecException: Process 'command 'C:\Users\KJA\AppData\Local\Android\sdk\build-too
ls\23.0.1\aapt.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 23.638 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
How can this be alleviated?
ref: https://github.com/oblador/react-native-vector-icons/issues/102
I spent a whole lot of time trying to figure out this error, and (at least for me) it turns out to be something really stupid, and largely unrelated to the react-native-vector-icon library.
After many hours of A-B-A testing, I have come to the conclusion that this library has some very long path names in it.
This really adversely affects Windows users.
If I have my project located at: C:\Users\MyName789\Dropbox\123 Software Development -- React Native\IconExplorer we get a total fail.
If I move the project to: C:\IconExplorer everything works well.
Recommendation for Windows users: There are many files affected while running react-native run-android. Long file name addresses will result in numerous errors, including Execution failed for task ':react-native-vector-icons:processReleaseResources' With that said, keep your file path names as short as possible!
On Windows one could fire up regedit, then search for
LongPathsEnabled
and set it to 1.
Do a reboot afterwards and if the problem lies only within long path names, it should be gone.