Ast
Ast

Reputation: 371

Android studio Iguana wear OS project only in kotlin

Is it my fault or is there no longer the possibility to create a Java project for Wear OS in Android Studio Iguana?

Upvotes: 1

Views: 115

Answers (1)

dect
dect

Reputation: 563

Since Android Studio Giraffe Google removed the templates for Java/View for wear os... The reason is that google is trying (and getting it) to replace java with kotlin/compose, but it doesn't mean you can't create a java project for wear os.

How to create: 1 - Create a "No activity" project; 2 - Right click on the project folder > New > Activity > Empty view activity; 3 - Check the manifest to see if the activity tag has been created, if not you can should add it...

    <activity
        android:name="packagePathHere.ClassName"
        android:exported="true" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

Upvotes: 1

Related Questions