Giter Club home page Giter Club logo

Comments (10)

AnnaClancy avatar AnnaClancy commented on June 29, 2024 2

上午把工程级build.gradle中全添加好了+app级里的[Cling library]的部分,发现可以直接调用函数!就很开心地跑去翻译姐姐的代码了!>v<

OvO刚刚看到邮件!
往app级里build.gradle加了其他代码,Sync Now后manifest报错!但报错的不是app下的mainfests里的xml文件,是一个debug文件夹里的xml文件.....

报错内容是对“manifest xmlns: android = ...”(也就是xml文件中最开始的内容)这一行
报错类型是:URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs)

查了一会

不、不明白,可我manifests里的xml文件好好的啊...这个debug里的xml是在干嘛... (/ __ \ )

from androidupnpdemo.

AnnaClancy avatar AnnaClancy commented on June 29, 2024 2

解决啦!
File -> Settings -> schemas and DtDs,把报错的路径拷贝了加进Ignored Schemas and DTDs就不报错了。

然后发现下面service、android:allowBackup等等等红色报错不是联动的= =
报错类型:Attribute androd:versionCode is not allowed here
???
clean&rebuild先走一遍!日常没用!
我去查资料了......

Just Close your manifest file and reopen it. It worked for me.

???
可这个报错的xml根本就不是我app里mannifests的xml!
rebuild出错的永远是debug\AndroidManifest.xml
我app里的xml可乖了才没有报错!

For your "attribute not allowed here" problem, versionCode, versionName have to be placed in the build.gradle file and not in the Android Manifest. That should solve the problem

UpDate :
remove this line from manifest.xml file.
android:versionCode="1"
android:versionName="1.0"

......app\src\main\AndroidManifest.xml早就没有这两行了。
debug\AndroidManifest.xml里也试过了,没有用。

我不想管你这个debug\AndroidManifest.xml了!!QAQ

上述解答的参考在这里!:https://stackoverflow.com/questions/38156447/attribute-android-is-not-allowed-here-and-show-this-message-error42-error-pa

from androidupnpdemo.

AnnaClancy avatar AnnaClancy commented on June 29, 2024 1

确定是因为

在 manifest 里面定义这个 Service
service android:name="org.fourthline.cling.android.AndroidUpnpServiceImpl"

导致的问题

但不要问我为什么因为我肯定不知道!= =(划掉)

  • 这是因为service的地址当然要是“自己”AndroidUpnpServiceImpl所在的位置啦...
    蠢新的悲惨之旅= =

from androidupnpdemo.

zaneCC avatar zaneCC commented on June 29, 2024

在工程级 build.gradle 添加:
buildscript {
...
repositories {
jcenter()
mavenCentral()
maven {
url 'http://4thline.org/m2'
}
}
...
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven {
url 'http://4thline.org/m2'
}
}
}

在 app级 build.gradle 添加:
android{
...
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/beans.xml'
}
...
}

dependencies {
...
// Cling library
compile 'org.fourthline.cling:cling-core:2.1.1'
compile 'org.fourthline.cling:cling-support:2.1.1'
// Jetty library
compile 'org.eclipse.jetty:jetty-server:8.1.12.v20130726'
compile 'org.eclipse.jetty:jetty-servlet:8.1.12.v20130726'
compile 'org.eclipse.jetty:jetty-client:8.1.12.v20130726'
compile 'org.slf4j:slf4j-simple:1.7.21'
compile 'com.koushikdutta.urlimageviewhelper:urlimageviewhelper:1.0.4'

...
}

from androidupnpdemo.

zaneCC avatar zaneCC commented on June 29, 2024

解决了吗?

from androidupnpdemo.

zaneCC avatar zaneCC commented on June 29, 2024

要么你clean一下。或者 rebuild一下。 哈哈。 如果还不行 你把你 manifest 贴一份

from androidupnpdemo.

AnnaClancy avatar AnnaClancy commented on June 29, 2024

哇你还笑!!!(超委屈)clean与rebuild都用过!!!查的时候就做过了.....
manifest本身没问题,它的复件(一模一样)报错而已。
如果不是什么大问题我不想折腾它了...好累。_(qwq / )__

from androidupnpdemo.

zaneCC avatar zaneCC commented on June 29, 2024

好好好 我不笑。, 你看一下这个能不能帮到你:https://stackoverflow.com/questions/17511254/android-studio-error-parsing-xml-uri-is-not-registered

from androidupnpdemo.

AnnaClancy avatar AnnaClancy commented on June 29, 2024

好——

from androidupnpdemo.

zaneCC avatar zaneCC commented on June 29, 2024

没问题我就close了啊

from androidupnpdemo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.