小编pet*_*ter的帖子

与印地语等TTS说话

在我的应用程序中,我想知道是否有任何tts引擎可以读取印地文文本.我的代码

tts.setLanguage(Locale.US);
Run Code Online (Sandbox Code Playgroud)

不幸的是,Android不支持印地语.请参阅下面支持的语言环境列表

http://developer.android.com/reference/java/util/Locale.html
Run Code Online (Sandbox Code Playgroud)

我将如何处理印地语现场任何帮助?提前致谢

android locale text-to-speech

6
推荐指数
1
解决办法
6049
查看次数

无法执行目标com.jayway.maven.plugins.android.generation2:android-maven-plugin

我想在maven中使用一个简单的android hello world程序.这是我的pom.xml文件

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.androidmaven</groupId>
<artifactId>gs-maven-android</artifactId>
<version>0.1.0</version>
<packaging>apk</packaging>

<dependencies>
    <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>android</artifactId>
        <version>4.1.1.4</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>com.jayway.maven.plugins.android.generation2</groupId>
            <artifactId>android-maven-plugin</artifactId>
            <version>3.8.2</version>
            <configuration>
                <sdk>
                    <platform>19</platform>
                </sdk>
                <deleteConflictingFiles>true</deleteConflictingFiles>
                <undeployBeforeDeploy>true</undeployBeforeDeploy>
            </configuration>
            <extensions>true</extensions>
        </plugin>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
</build>
Run Code Online (Sandbox Code Playgroud)

得到这个错误

[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:andr
oid-maven-plugin:3.8.2:generate-sources (default-generate-sources) on project gs
-maven-android: Execution default-generate-sources of goal com.jayway.maven.plug
ins.android.generation2:android-maven-plugin:3.8.2:generate-sources failed: Erro
r reading D:\adt-bundle-windows-x86-20130522\sdk\tools\tools\source.properties -
> [Help 1]
[ERROR]
[ERROR] To …
Run Code Online (Sandbox Code Playgroud)

java xml android build-script maven

5
推荐指数
1
解决办法
3254
查看次数

在webview中播放管视频时,应用程序崩溃了吗?

我是android混合开发的新手.我已经将Youtube视频嵌入到html页面中

<object width="100%"  height="auto" width="auto"
type="text/html" data="http://www.youtube.com/embed/Q7DojKxaNxE">Unable to play video.
<param name="movie" value="http://www.youtube.com/embed/AlSbZvK1O1Y"/>
</object>
Run Code Online (Sandbox Code Playgroud)

这个html页面正在加载webview.现在,当我尝试在webview应用程序中播放视频时崩溃和跟随是错误日志

FATAL EXCEPTION: main
java.lang.NullPointerException
at android.webkit.HTML5VideoView.reprepareData(HTML5VideoView.java:352)
at android.webkit.HTML5VideoViewProxy$VideoPlayer.play(HTML5VideoViewProxy.java:245)
at android.webkit.HTML5VideoViewProxy.handleMessage(HTML5VideoViewProxy.java:447)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5317)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Run Code Online (Sandbox Code Playgroud)

我在webview中加载了html页面,如下所示,

this.mainWebView.loadUrl("file:///android_asset/html1/this-app.html");
Run Code Online (Sandbox Code Playgroud)

我在android 4.4.2版三星设备上测试过.

请任何人帮助我.

提前致谢

html5 android webkit webview youtube-javascript-api

5
推荐指数
0
解决办法
713
查看次数