Object reference not set to an instance of an object When I create new Android App (Visual Studio)

前端 未结 5 693
清歌不尽
清歌不尽 2020-12-03 21:32

In a Visual Studio 2015, Xamarin, Android SDK, jdk 1.7, and emulator are installed and Xamarin has all green checked items in tools>options>Xamarin. But When I try to create

相关标签:
5条回答
  • 2020-12-03 21:44

    I solved it with updated Android SDK setup (API Level 19 and 21) [3rd party] to Android SDK setup (API Level 22) [3rd party] in Visual Studio setup.

    0 讨论(0)
  • 2020-12-03 21:54

    I also encounter this problem on Visual Studio 2015 Update 2 with Xamarin.VisualStudio_4.0.3.214, but I solved it by installing level 19, 21, 22, 23 through Android SDK Manager.

    0 讨论(0)
  • 2020-12-03 21:57

    I struggle with this same problem for a whole day but I got it resolved after several iterations.

    1. Make sure Android Studio is not installed on your computer. If it is, uninstall it and run the VS2015 installer again until all Android SDK errors go away.

    2. Make sure VS2015 is closed and install the most recent stable version of Xamarin for Visual Studio 2015. I found it here: https://store.xamarin.com/account/my/subscription/downloads. (Trying to install it through VS2015 didn't work for me under Tools -> Android -> Settings -> Xamarin for Visual Studio Updates.)

    3. Make sure you have Java SDK version 7 installed on your machine (do not use 8 even though its the latest). You also must use the 32-bit version even if you have a 64-bit machine. This was key!

    4. Install the Android SDK. Standalone version, not Android Studio + Android SDK.

    5. Install the Android NDK.

    6. Restart your computer and open VS2015. Go to Tools -> Android -> Settings and set the correct paths to Android SDK, NDK and Java SDK.

    7. You should be good to go with creating a new project. You are all welcome!!!

    0 讨论(0)
  • 2020-12-03 22:09

    I figured out this... Depending on the emulators you want to use with the new project, subject to what is installed using Android AVD, you will need to download the necessary API Level.

    Example. I looked up my emulators. Then I simply opened Android SDK Manager and downloaded the corresponding API Level 19

    And everything worked out well

    0 讨论(0)
  • 2020-12-03 22:11

    I had the same problem and when I installed Android 4.4.2(API 19) from Android SDK Manager the issue got resolved. You can open Android SDK Manager in VS2015 with Update 2 by navigating to Tools-> Android->Android SDK Manager

    0 讨论(0)
提交回复
热议问题