java.lang.ClassNotFoundException: Flutter install - flutter

I was installing flutter and the error showing is
Could not find or load main class
java.lang.ClassNotFoundException
I have already downloaded SDK manager

Related

can't install flutter session package

I'm currently working on my first ever flutter project.
I tried to install flutter session package but it shows me this error
These are the packages I currently have

Flutter java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/view/WindowInsetsControllerCompat;

When upgrading Flutter from version 2.5.3 to 2.8.1. I get this error and the app crashes. The app does compile and the main screen does appear for a split second but then it crashes and disappears. I have migrated the project to androidX. I have also updated the DartSDK version to 2.15.1.
Thank you for your help!

SDK manager path [duplicate]

I am trying to build old unity version(v_4.6.3) project. but i have got a error. already i have got successful result, but current my sdk is updated with latest version.
http://screencast.com/t/u7lNiyoc
Here is my unity error log.
Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
C:\Program Files\Java\jdk1.8.0_66\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="E:/Temp/sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files (x86)/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -
stderr[
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/utils/ILogger
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at SDKMain.main(SDKMain.java:128)
Caused by: java.lang.ClassNotFoundException: com.android.utils.ILogger
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more
]
stdout[
]
How can i fix this issues. Thank you for advances. Kind Regards.
The solution to this problem is constantly changing over time as Unity and the Android SDK change.
Note that his problem is presumably fixed in Unity 2017.1.
LATEST SOLUTION
1) For Windows, download "tools_r25.2.3-windows.zip" and unzip it.
2) For MacOSX, download "tools_r25.2.3-macosx.zip" and unzip it.
3) Add the path of the unzipped SDK to the Edit -->Preferences ---> External Tools --->SDK box.
STILL NOT WORKING?
Uninstall SDK Tools 25 and Android SDK Tools 26. Uninstall both SDK Platform-Tools and SDK Tools. Use version number below that.
OLD SOLUTION:
You did not setup your SDK properly.
Follow the steps below to setup your Android SDK.
1. Make sure that there are no spaces in your SDKpath. So create a folder called AndroidSDK in the C directory.
2. Copy your Android-sdk folder to the C:/AndroidSDK directory.
Now, your SDK path should look like this:
C:/AndroidSDK/Android-sdk
3. Update your Android SDK path in the Unity Editor.
Now, check if it works by trying to Build for Android again.
If it fails, continue from below
4. Download the latest Unity version.
5. Re-download SDK then copy the file to C:/AndroidSDK/Android-sdk.
6. Go back to Unity and Update the path
7. Build the Project for Android again, it will show an error and ask you to update SDK.
Click on the "Update Android SDK" buttom. Unity will Automatically update your SDK. Your SDK should then look like something below. Your problem should be gone by now.

(Unity android build error) Error building Player: CommandInvokationFailure: Unable to list target platforms issue [duplicate]

I am trying to build old unity version(v_4.6.3) project. but i have got a error. already i have got successful result, but current my sdk is updated with latest version.
http://screencast.com/t/u7lNiyoc
Here is my unity error log.
Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
C:\Program Files\Java\jdk1.8.0_66\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="E:/Temp/sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files (x86)/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -
stderr[
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/utils/ILogger
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at SDKMain.main(SDKMain.java:128)
Caused by: java.lang.ClassNotFoundException: com.android.utils.ILogger
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more
]
stdout[
]
How can i fix this issues. Thank you for advances. Kind Regards.
The solution to this problem is constantly changing over time as Unity and the Android SDK change.
Note that his problem is presumably fixed in Unity 2017.1.
LATEST SOLUTION
1) For Windows, download "tools_r25.2.3-windows.zip" and unzip it.
2) For MacOSX, download "tools_r25.2.3-macosx.zip" and unzip it.
3) Add the path of the unzipped SDK to the Edit -->Preferences ---> External Tools --->SDK box.
STILL NOT WORKING?
Uninstall SDK Tools 25 and Android SDK Tools 26. Uninstall both SDK Platform-Tools and SDK Tools. Use version number below that.
OLD SOLUTION:
You did not setup your SDK properly.
Follow the steps below to setup your Android SDK.
1. Make sure that there are no spaces in your SDKpath. So create a folder called AndroidSDK in the C directory.
2. Copy your Android-sdk folder to the C:/AndroidSDK directory.
Now, your SDK path should look like this:
C:/AndroidSDK/Android-sdk
3. Update your Android SDK path in the Unity Editor.
Now, check if it works by trying to Build for Android again.
If it fails, continue from below
4. Download the latest Unity version.
5. Re-download SDK then copy the file to C:/AndroidSDK/Android-sdk.
6. Go back to Unity and Update the path
7. Build the Project for Android again, it will show an error and ask you to update SDK.
Click on the "Update Android SDK" buttom. Unity will Automatically update your SDK. Your SDK should then look like something below. Your problem should be gone by now.

How to install Play Store App on Android Studio Emulator Google API 23

I selected this emulator from the newest version of Android Studio AVD,
Google API 23
I have selected the latest version of android API 23. Because it says "with Google APIs", I thought that it would actually include all the Google apps, including Play Store so that I can install apps like Facebook.
But I can't see any Google Apps in it.
How do I install Gapps on Android Studio Emulator with Google API23?
Starting from API24 Google publishes emulator images with Google Play. Download it from CLI:
yes | sdkmanager "system-images;android-24;google_apis_playstore;x86" \
"system-images;android-25;google_apis_playstore;x86" \
"system-images;android-26;google_apis_playstore;x86" \
"system-images;android-27;google_apis_playstore;x86" \
"system-images;android-28;google_apis_playstore;x86_64"
Or download it from AndroidStudio:
You can install a particular system image via the terminal, with the following command:
sdkmanager "system-images;android-30;google_apis_playstore;x86"
Trying to install the system images via the terminal, produced the following error:
'sdkmanager' is not recognized as an internal or external command,
operable program or batch file.
If you get this error, then you need to locate where sdkmanager is installed and add that folder to your PATH environment variable.
For me this was located under <AndroidSDK>\tools\bin
However, even after doing this I still got the following error.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 5 more