kivylauncher :No projects available to launcher.

65 views
Skip to first unread message

yi tian

unread,
Sep 8, 2019, 11:26:31 PM9/8/19
to Kivy users support
 I tried to debug the program with kivy launcher.
I installed KivyLauncher-1.9.0.0.apk in genymotion.
Then pass the file to the /sdcard/kivy/cavns directory.
Run kivylauncher.
But there is always this hint. do not know why? ?

l.png

Three files in the /sdcard/kivy/cavns directory
main.py
import kivy
kivy
.require('1.11.1')
from kivy.app import App
from kivy.lang.builder import Builder
from kivy.uix.screenmanager import Screen, ScreenManager, FadeTransition
from kivy.uix.widget import Widget
from kivy.graphics import Line, Color
from random import random

class PinterShow(Widget):
   
def on_touch_down(self, touch):
       
global TheCanvas
       
TheCanvas = self.canvas
       
with TheCanvas:
           
Color(random(),random(),random())
            touch
.ud['line'] = Line(points=(touch.x, touch.y))


   
def on_touch_move(self, touch):
        touch
.ud['line'].points += [touch.x, touch.y]

   
def ClearCanvas(self):
       
print('1')
       
TheCanvas.clear()

class MainScreen(Screen):
   
pass

class AnotherScreen(Screen):
   
pass


class ScreenManagement(ScreenManager):
   
pass


class SimpleKivy(App):

   
def build(self):
       
return Builder.load_file('SimpleKivy.kv')


if __name__ == '__main__':
   
SimpleKivy().run()

SimpleKivy.kv
#: import FadeTransition kivy.uix.screenmanager.FadeTransition
#: import GridLayout kivy.uix.gridlayout.GridLayout

ScreenManagement:
    transition
: FadeTransition()
   
MainScreen:
   
AnotherScreen:

<MainScreen>:
    name
: 'main'
   
Button:
        on_release
: app.root.current = 'other'
        text
: 'next screen'
        font_size
: 40

<AnotherScreen>:
    name
: 'other'
   
FloatLayout:
       
PinterShow:
            id
: ps
       
Button:
            text
: 'back home'
            font_size
: 20
            color
: 0,1,0,1
            size_hint
: 0.2, 0.1
            pos_hint
: {'buttom': 0, 'buttom':0}
            on_release
: app.root.current = 'main'
       
Button:
            text
: 'clear'
            font_size
: 20
            color
: 0,1,0,1
            size_hint
: 0.2, 0.1
            pos_hint
: {'x': 0.2, 'buttom':0}
            on_release
: ps.ClearCanvas()

android.txt
title=SimpleKivy

author
=Kiveam

orientation
=landscape




My kivy version: 1.11
Is it because the version is different?

Robert Flatt

unread,
Sep 9, 2019, 9:41:19 PM9/9/19
to Kivy users support

yi tian

unread,
Sep 9, 2019, 11:17:49 PM9/9/19
to Kivy users support
 I put the files in the /kivy directory. But still the same mistake.

Robert Flatt

unread,
Sep 9, 2019, 11:33:04 PM9/9/19
to Kivy users support

Do you have the same issue on a physical android device?
Message has been deleted

yi tian

unread,
Sep 10, 2019, 10:38:38 PM9/10/19
to Kivy users support

I built the kivy directory on my mobile phone expansion card. Copy the code into it.
But kivylauncher is the same mistake.


在 2019年9月10日星期二 UTC+8上午11:33:04,Robert Flatt写道:

Robert Flatt

unread,
Sep 11, 2019, 1:31:52 AM9/11/19
to Kivy users support
Well the lesson for me seems to be ignore the documentation :(

Kivy Launcher finds the app if all three files are in SimpleKivy    (this is the App class name and the android.txt title)

so for example: /sdcard/kivy/SimpleKivy/android.txt    

And "/sdcard" is where, for example, the Android, Music, and Download folders are.

On starting Kivy Launcher it says "Please choose a project:"
And SimpleKivy is there

But if I try to run this project it crashes. :(    Have fun figuring it out....

Btw one comment in the app store says:
"Doesn't appear to support a .kv file in the project which makes it difficult to use."
I have no idea if this is correct but it would be something to test.

I think I prefer making .apk files  :)

Robert Flatt

unread,
Sep 11, 2019, 9:20:39 PM9/11/19
to Kivy users support
Given the crash of the app above, I wondered....
This example works fine. 
I did not try with a .kv

Files are located as described in previous post

kivy/Rays/main.py
kivy/Rays/android.txt

main.py
from random import random, randrange
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.graphics import Color, Line
from kivy.clock import Clock

class RaysWidget(Widget):

   
def _new_line(self):
        x
= 0
        y
= 0
        line
= [x,y]
       
for i in range(200):
            x
+= randrange(50)
            y
+= randrange(100)
            line
.append(x)
            line
.append(y)

       
with self.canvas:
             
Color(random(), random(), 1)
             
Line(points=line)

   
def new_lines(self,dt):
       
self.canvas.clear()
       
for i in range(100):
           
self._new_line()

class RaysApp(App):

   
def build(self):
        rays
= RaysWidget()
       
Clock.schedule_interval(rays.new_lines, 0.2)
       
return rays

if __name__ == '__main__':
   
RaysApp().run()

android.txt
title=Rays

author
=Nobody

orientation
=portrait



yi tian

unread,
Sep 12, 2019, 5:54:16 AM9/12/19
to Kivy users support
Thank you
I tried it as you wrote it, but it is still the same mistake.


在 2019年9月12日星期四 UTC+8上午9:20:39,Robert Flatt写道:

Robert Flatt

unread,
Sep 12, 2019, 12:52:19 PM9/12/19
to Kivy users support
By "same mistake" I assume you mean the "mistake" first posted:
l.png
Is this still the message?

This means Kivy Launcher is not finding the app files, the files are not where it expects (under "/storage/emulated/0") or are not exactly what it expects when it starts. So this is about understanding how your version Android is configured.

Did you clear Kivy Launcher from the recent apps? (was it really closed?)
What is the Android version ?
On your phone what are all the folders contained in   "/storage/emulated/0"    ?

yi tian

unread,
Sep 13, 2019, 3:31:42 AM9/13/19
to Kivy users support
I tried it a few times and finally I can. Found the application file
But the runtime just appears: loading.
Then I quit myself.
This is the same as running the compiled apk file.

I saw this two lines in buildozer android logcat

123.png


It is also the same as the error when I run apk.

在 2019年9月13日星期五 UTC+8上午12:52:19,Robert Flatt写道:

Robert Flatt

unread,
Sep 13, 2019, 4:29:48 PM9/13/19
to Kivy users support
I understand you to say:
On a physical android device the Rays example I posted above fails in Kivy Launcher.
The two files contents are not changed and the file names are not changed.
Kivy Launcher has been removed from the app Android history before starting it.
The menu item "Rays" appears when Kivy Launcher starts.
When you touch the "Rays" menu item the Launcher just says "loading...." and else nothing happens.

Is this correct?

Whatever the issue is with building an apk please discuss in the different thread, this thread is about Kivy Launcher.

yi tian

unread,
Sep 14, 2019, 3:46:28 AM9/14/19
to Kivy users support
Is such that.
I am running this on a straight mobile phone, showing: loading... and then it is gone.
So I want to debug with kivylauncher, the result is the same error as the apk runtime.
I don't know what to do? ?
No similar problems can be found online.


在 2019年9月14日星期六 UTC+8上午4:29:48,Robert Flatt写道:

Robert Flatt

unread,
Sep 14, 2019, 12:42:14 PM9/14/19
to Kivy users support
To be clear, are you using the example I sent to you?
Reply all
Reply to author
Forward
Message has been deleted
0 new messages