Use Android Studio to code for an old platform - android-studio

I want to develop an app for an old tablet using API 7 Android Eclair 2.1, but I'm facing problems setting up all the tools needed.
I tried using Android Studio, but when creating a new app, the lowest API I can choose is 14, and when I change it via code, it complains about the libraries being not compatible.
I also tried importing some samples, but it tries to download some old version of gradle and apparently the link is down.
I recall that prior to Android Studio, one would use Eclipse, but it seems that it is no longer available.
Is it possible to set up a development environment, or am I better to code from scratch and compile it myself?

Related

Why does QiSDK fail to resolve?

I'm trying to make an application for SoftBank's robot Pepper using Android Studio, Java and QiSDK as recommended on their website. After I create a robot application that adds the needed QiSDK dependencies to the project, those would not resolve after a gradle project sync. Image of a warning message.
I tried to create a project on different devices, but got the same result. Is it maybe a problem that I am using a newer version of Android Studio 2021.3.1 Patch 1?

How to configure an iOS Application for Kotlin Multiplatform in Android Studio?

I want to add a Run/Debug Configuration for an iOS Application for a Kotlin Multiplatform Mobile application in Android Studio 4.1.2. However, there seems to be a problem with the configuration for iOS.
In the screenshot below you can see the problem. In the dialog "Run/Debug Configuration" Android Studio complains about
Error: Please specify Xcode project location in xcodeproj property of gradle.properties
Using the "Fix" button does not solve the problem. Android Studio just adds an additional xcodeproj to gradle.properties and the complains about a duplicate parameter.
I also tried different paths (relative and absolute) for xcodeproj. No luck.
If I remember correctly, it used to work out of the box. A new Kotlin Multiplatform Mobile project was automatically configured for Android and iOS. I'm not sure what changed. Probably something was updated.
Is this a bug with the KMM plugin? Or is there something I can do on my system to fix this?
don't do that with Android Studio.
Just open Xcode, click on 'open another project...', locate to the iosApp folder that named it when creating your project on Android Studio.
after that, just click run and have fun.
If the project doesn't run right away even on opening it from Xcode and shows the shared framework is missing, Then try generating the shared framework for iOS platform using terminal. Navigate to the project folder and execute
Command: ./gradlew packForXcode
Now the shared framework should have a xcode-frameworks product and you should be able to build and run the project through Xcode.
I fixed it by downgrading the Kotlin version from 1.4.30 to 1.4.21. You can check this thread here. To downgrade, download the version you want from the plugin store and choose the install plugin from disk as in the picture below
Upgrading Android Studio version to 4.2.1, KMM plugin version to 0.2.6, creating new KMM project with KMM plugin, the problem can be fixed automatically.
If you don't wanna use Xcode:
Look like there is some IDE issues in this versions, one option would be to downgrade the Kotlin version.
What worked for me was to download the latest Canary Android Studio and setup my KMM project there.
Hopefully soon this will be stable for the next versions
Same as here: https://stackoverflow.com/a/66941077/3117650
Look like there is some IDE issues in this versions, one option would be to downgrade the Kotlin version.
What worked for me was to download the latest Canary Android Studio and setup my KMM project there.
Hopefully soon this will be stable for the next versions

Does Android studio need internet connection to build project

I am using Android studio version 0.4.2 and gradle version 1.9. I have successfully installed Studio and have created multiple projects. Today when I launched Studio without internet connection,
I got this error message:
"Gradle project sync failed. Basic functionality (e.g. editing,
debugging) will not work properly" and the Event Log window shows
"Failed to refresh Gradle project < Project Name >. Connection timed
out: connect. If you are behind an HTTP proxy, please configure the
proxy settings either in IDE or Gradle."
I need to know if internet connection is mandatory for building projects using gradle.
I think gradle checks for latest version on internet and throws Connection time out error. If so, is there any workaround to disable that.
Currently Android Studio's Gradle implementation requires a fast stable network connection. For whatever reason, the developers have decided to force this requirement on users at this time. There is a setting that you should be able to use to utilize a local gradle installation, but it doesn't hold. The developers know about both the network requirement and the broken switch, but are currently prioritizing other functionality. They may remove that requirement in the 1.0 or post 1.0 time frame.
[see: https://plus.google.com/u/0/115692564989237473252/posts/LGSbniYqj3Q ]
Gradle's offline mode, isn't. It should be properly named cached mode. All that switch does is tell gradle to not try to go online and instead utilize cached copies of the various networked resources. Unfortunately that assumes that you have had (and will have again) a network connection, preferably a fast stable one. Using Android Studio (last version tested 0.5.9) with a slow/unstable network results in watching Android Studio process Gradle ( and Maven ) processes usually for 2-5 minutes, sometimes for 10 minutes or more. Also at seemingly random times when coding the IDE will lock up and the cause usually involves one or more Gradle processes that have spun up.
As a comparison, using IntelliJ IDEA 13.1 Community edition (the IDE that Android Studio is based on) I compared a default "Hello Android" IDE generated program using the Android Gradle wizard (substantially similar to the only one in Android Studio) and the Ant based Android wizard. The results were as expected. The gradle based project experienced the same painful lock up and lag that projects in Android Studio exhibited. The ant based Android project was near instantaneous. No appreciable delay once the project was created and opened. Coding caused no random lockups. Testing was done on a Windows 8.1 update1 Pro machine with a dual Athlon x2 processor, 6GB RAM, and a 6Mb/0.75Mb DSL connection. I believe that last part is most likely the issue.
Unfortunately until Android Studio removes the network requirement I feel it will be unusable to a large number of developers. That's a shame because otherwise it looks to be a marked improvement over the existing Eclipse based development environment.
For me, I had to check and then uncheck the box in
Preferences->Gradle->Offline work.
Then I got back online.
You can download the gradle distribution locally and build the project again.
To do this, edit your gradle-wrapper.properties under gradle-> wrapper in your Android project.
Edit the
distributionUrl=https://services.gradle.org/distributions/gradle-2.2.1-all.zip
to
distributionUrl=file:///home/foo/downloads/gradle-2.2.1-all.zip
So just download the file from here as mentioned in your gradle-wrapper.properties.
There's an offline mode preference in Preferences > Compiler > Gradle. If you already have your dependencies downloaded, this will generally work for you.
In Android studio version 1.5.1 I could solve this error by following steps :
1) Go to file -> Settings -> HTTP Proxy -> & select Auto detect proxy settings.
2) After that you may get Dialog to accept or reject certificate
3) Select Accept.
That's it.

Is there a way to remotely build Xamarin.iOS with sdk 6.1 in VS2012?

I have an iOS project that was developed for iOS6.1 and I need to be able to build it for both iOS6.1 and iOS7. I updated all tools from Xamarin and upgraded to OSX Mavericks and iOS 7.0.3 on the iPhone. So at this time I have all latest versions.
When I start to debug the project from VS2012, the app that starts on the iPhone is always an iOS7 app. I added the iOS6.1.sdk to Xcode 5 so back on the Windows machine I can select this SDK in VS2012 for compilation.
But it seems that, whatever SDK I choose in the project settings, it always returns:
-debug -linksdkonly-sdk "7.0"-targetver "6.1" --abi=armv7 (arguments taken from the mtbserver.log on the building host)
If I build the project with Xamarin Studio on the Mac the behavior is as expecting when changing the version of the SDK.
Is there a way to get around this when building remotely with VS2012?
That's a bit uncommon and it sounds like a bug - you should file it on bugzilla so it will be confirmed (and fixed if it's the case).
Most people I know install several Xcode side-by-side, i.e. they do not copy an old .sdk directory into a newer Xcode release.
You might want to try this (the trick is to rename Xcode.app before installing the new one) and then set the VS addin to the older (e.g. Xcode46.app) directory when you need to build for iOS 6.1.

Android studio doesn't create project structure

I am new to Android studio. I tried to create my first project and there is no project structure only gradle files. What am I doing wrong? I keep getting these files with creation of another new project.
Update SDK via Android SDK Manager. You need all packages in Tools to be installed.
But even after doing so, I can't make it to auto generate resources. So I continue to deal with it...
I found what was my problem. I updated Android studio from version 1.x to 2.x. On official site is written that if you try to install version 2.x into same location Android studio might not work properly and there could be some unexpected behavior.
So just removing Android studio and then reinstaling it, worked perfectly.

Resources