Cannot obtain the application id some one know how to fix it? - android

the app is not working in the emulator
when i try i got this message
Run configuration app is not supported
in the current projet.
Cannot obtain the application id
I reinstalled android

Clean Project - Build -> Clean project
Rebuild project - Build -> Rebuild project
Invalidate Cache - File -> Invalidate Caches / Restart -> Invalidate and restart

Related

Gradle daneom starting again and again in android gradle sync

i cloned a project from git and it is starting gradle daneom again and again
It gradle sync should be successful because it is a google codelabs project.
You can try to delete the .gradle directory. It is located in your "user" home directory. This will force Gradle to re-download all dependencies.
Also it might be smart to invalidate caches and restart. Go to File -> Invalidate Caches / Restart.

activity_main.xml for android studio stuck on loading

I just downloaded Android Studio to make an app for my STEM competition. I tried making an app, opened the activity_main.xml file, but it is stuck on loading! It says, `
"Gradle: download gradle-5.6.4-all.zip...".
In Android Studio try to go to File -> Invalidate Caches/Restart -> Invalidate and restart.
this will help u surely
In Android Studio try to go to File -> Invalidate Caches/Restart -> Invalidate and restart.
Firstly you need to try that option
Go to Build-> Clean Project
After clean your project complete
Go to Build-> Rebuild Project
IF that thing does not solve the problem then
Please
Go to File->Invalidate Cache/Restart-> Invalidate and restart
Actually
Android Studio makes a lot of files as caches and does not delete them. This can cause trouble when there is a need to make new files, so clearing caches will clear the old cache and make Android Studio faster and Smooth.
Hope that will hep you
Step 1:
Close all opened project and bring back Android Studio Welcome Screen.
Step 2:
Select Configure
Step 3:
Select Restore Default Settings...(Restore and Restart)
Step 4:
Setup Android Studio as new
OR
Install new version of Android Studio

Android Studio 3.3 Stuck at Project Setup:reading from cache

I have create module library with NDK. After updating Android Studio 3.3, open project on studio stuck on build project
Project Setup:reading from cache...
Every time needs to "Invalidate and Restart" android studio then after studio working.
I have try to delete .gradle folder but still facing this issue.
How can I solved this misbehavior of studio 3.3?
I don't have enough reputation to comment so I'll post this as an answer.
After you Invalidate and Restart have you tried Build->Clean Project and rebuilding then syncing again?
Have you tried restarting your computer to turn of any processes that may keep caches from clearing?
Have you tried upgrading your gradle version as well (inside your gradle-wrapper.properties)?
Have you checked if your gradle path is correct at File -> Settings -> Build, Execution, Deployment -> Gradle?
Have you tried locating your gradlew and doing a gradlew cleanBuildCache?
Have you tried removing the C:\Users\{Your Username}\.gradle\caches folder?
Have you tried disabling cache building altogether (will slow down your build and is not recommended)? To do this you have to go to your gradle.properties file and set android.enableBuildCache=false
Gradle caches are at
On macOS/Linux: $HOME/.gradle/caches/
On Windows: %USER_HOME%\.gradle/caches/
Try to delete those directories.
More about build caches is here: Android Studio Build Cache
Also, Disable configuration on demand in your gradle.properties file as shown below:
org.gradle.configureondemand=false
See: Known issues with the Android Gradle Plugin
Try Below approach:
Go to "
File -> Settings -> Build, Execution, Deployment -> Instant Run"
and just disable it.
With this Android Studio builds from scratch each time but it's better than not building it right.
open your project's gradle.perperties file and add settings:
org.gradle.configureondemand=false
restart your projects

Gradle hangs on Executing tasks: [:android:generateDebugSources

Since updating my Mac OS X to El Capitan (and android studio from 1.5.1 to 2.x with all tools and sdks) I have problems with my libgdx-robovm game in Android Studio. When I'm doing Gradle Sync it always hangs on:
Executing tasks: [:android:generateDebugSources,
:android:generateDebugAndroidTestSources, :android:mockableAndroidJar,
:android:prepareDebugUnitTestDependencies,
:android-full:generateDebugSources,
:android-full:generateDebugAndroidTestSources,
:android-full:mockableAndroidJar,
:android-full:prepareDebugUnitTestDependencies]
Always. By hanging I mean it goes forever.
I've seen few topics with the same problem, but I cannot find any solution and I'm really frustrated. I've tried:
1) Made sure that I have zlib installed (s /usr/include/zlib.h),
2) In Global Gradle settings I've tried turning on "Offline work", but result is the same,
3) Clearing robovm and gradle cache,
4) Restarting Android Studio,
5) Updating Android Studio to the latest stable version,
6) I've tried latest gradle, but it only raised new problems, finally after getting rid of them I got to the same point (hanging),
7) Removing .gradle directory,
8) Removing contents of build directory,
9) Clean & Rebuild,
10) Invalidate & Restart - after restarting it's not hanging, but any operation (clean, rebuild, sync) hangs gradle again,
11) Tried older Android Studio (1.5.1),
12) Tried different gradle plugin versions: 1.2.3, 1.5.0, 2.0+
13) Tried different android build tools (22.0.1 and 23.x.x)
14) Compiling straight from console (with -d for more logs):
Few last lines:
11:17:41.891 [DEBUG]
[org.gradle.model.internal.registry.DefaultModelRegistry]
Transitioning model element 'tasks.tasks' to state GraphClosed.
11:17:41.891 [INFO]
[org.gradle.execution.TaskNameResolvingBuildConfigurationAction
]
Selected primary task 'tasks' from project : 11:17:41.893 [DEBUG]
[org.gradle.execution.taskgraph.DefaultTaskGraphExecuter] Timing:
Creating the DAG took 0.002 secs 11:17:41.894 [INFO]
[org.gradle.BuildLogger] All projects evaluated.
Configuring > 7/7 projects
(goes forever...)
edit:
The problem which probably caused this freeze was the fact that I had 2 subprojects for ios (robovm) and when I removed one of them it finally worked. This is only a problem for ios as for android 2 submodules wasn't an issue. I also had to update robovm to the latest version.
We had this problem in our shop after the last upgrade, but all we had to do was
Build > Clean Project
Build > Rebuild Project
try to run it, if it doesnt work then go to
File > Invalid Caches / Restart and select "Invalidate and Restart"
then close the project, reopen it and run it again.
delete .gradle file and after that
Build > Clean Project
Build > Rebuild Project
try to run it, if it doesnt work then go to
File > Invalid Caches / Restart and select "Invalidate and Restart"
then close the project, reopen it and run it again.
Try some of these too :
Delete manually all the build's outputs created.
In setting -> Build tools -> check for default gradle wrapper.
Remove extra gradles versions , keep the latest one in studio.
Invalidate and restart.
Hopefully this will solve your problem. :)
I overcome that issue by following way:
File:Settings >> Instant Run >> Disable instant run
and then
Invalidate cache and Restart

How to resolve this error in android studio shows error on all the lines even after sync gradle?

My project worked perfect this error which occurred for me after my system get restarted unfortunately even though I have reinstalled Java and android studio even though I did't get solved what could be the solution.
Have you tried rebuilding, cleaning project and or invalidate caches?
Build -> Clean Project
Build -> Rebuild Project
File -> Invalidate caches / Restart

Categories

Resources